Posts

Showing posts from November, 2022

C# Reflection

Image
 In C#, reflection is a process to get metadata of a type at runtime. The System.Reflection namespace contains required classes for reflection such as: Type MemberInfo ConstructorInfo MethodInfo FieldInfo PropertyInfo TypeInfo EventInfo Module Assembly AssemblyName Pointer etc. The System.Reflection.Emit namespace contains classes to emit metadata Reflection in C# provides objects (of type Type) that describe assemblies, modules, and types. You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties. Reflection is needed when you want to determine or inspect the content of an assembly. Here, content means the metadata of an assembly like what are the methods in that assembly, what are the properties in that assembly, are they public, are they private, etc How to Implement Reflection in C#? So, now we are going to write a simple example impleme

IISRESET vs App Pool Recycling ?

Image
 I think most IIS administrators know IISRESET command, and why they use it. One of possible reasons can be to restart IIS services to initialize web applications, or to apply some changes of applications & IIS settings .There’re just a few conditions those need your IISRESET command. In most situations, you don’t need this. I have a concern if you always run this command for applying any changes, or release system resource – memory – regularly, or frequently. Because it’s much more cost than what you really need to take – there’re side effects Recycling App Pool’ has been introduced from IIS6 in Windows2003. It’s designed to restart only application pools(=worker processes). It can be done in a command prompt(run ‘IISAPP /?’ in a command prompt for details), as well as in the IIS manager What IISRESET does? When you run IISRESET, many things will happen. In order to understand them, I think I need to show you how IIS looks like – about IIS core components. The below shows you role

.NET Core vs .NET Framework?

Image
 A while back, we predicted that . NET Core would be the next big thing, offering developers many options in application development. Indeed, there is huge demand for developers skilled in this technology. But how does it differ from the . NET Framework , and what do you need to know to use them both effectively? Today, we’ll contrast .NET Core vs  .NET Framework to help you choose which one to use for your next project. In this post, we’ll explain their key differences and how to make the best use of each.  Look at history of .NET Framework below for more understanding. Historically, the .NET Framework has only worked on Windows devices. The Xamarin and Mono projects worked to bring .NET to mobile devices, macOS and Linux . Now, .NET Core provides a standard base library that’s usable across Windows, Linux, macOS and mobile devices (via Xamarin). There are four major components in .NET architecture Common language specification (CLS) defines how objects are implemented so the

Culture and UI Culture for ASP.NET Web Page Globalization

 In an ASP.NET Web page, you can set to two culture values, the Culture and UICulture properties. The Culture value determines the results of culture-dependent functions, such as the date, number, and currency formatting, and so on. The UICulture value determines which resources are loaded for the page Note The Culture and UICulture properties are set using Internet-standard strings that identify the language (for example, en for English, es for Spanish, and de for German) and culture (for example, US for the United States, GB for Great Britain, MX for Mexico, and DE for Germany). Some examples are en-US for English/United States, en-GB for English/Great Britain, and es-MX for Spanish/Mexico. For more information, see CultureInfo The two culture settings do not have to have the same value. Depending on your application, it might be important to set them separately. An example is a Web auction site. The UICulture property might change for each Web browser, whereas the Culture stays con