Akshay Khot

Akshay Khot

23 Articles Published

Articles by Akshay Khot

Page 3 of 3

Explain the custom value types in .NET

Akshay Khot
Akshay Khot
Updated on 19-May-2021 1K+ Views

Variables of value types directly contain the values. When you assign one value type variable to another, each variable associates with a different storage location in memory. Hence, Changing the value of one value type variable doesn't affect the value in the second variable.Similarly, when you pass an instance of a value type to a method, the compiler copies the memory associated with the argument to a new location associated with the parameter. Any changes to the parameter won't affect the original value. Since memory is copied for value types, they should be small (typically, less than 16 bytes).All the ...

Read More

Explain how reflection works in .NET framework

Akshay Khot
Akshay Khot
Updated on 19-May-2021 450 Views

A C# program compiles to a DLL assembly that contains the compiled C# code along with the metadata for the runtime, and other resources. C# provides a reflection API that lets us inspect the metadata and compiled code at runtime.Using reflection, it's possible to −Access the assembly metadata for all types inside the assemblyObtain a list of types and their members (methods, properties, etc.)Dynamically invoke the type members at runtime.Instantiate objects by only providing their nameBuild assembliesIn a traditional program, when you compile the source code to the machine code, the compiler removes all the metadata about the code. However, ...

Read More

Provide a brief overview of the C# and .NET ecosystem

Akshay Khot
Akshay Khot
Updated on 19-May-2021 735 Views

C# is an object-oriented, type-safe and general-purpose programming language, which focuses on making the programmers productive. It tries to achieve this productivity through expressiveness, simplicity and a focus on performance. It works on different platforms such as Windows, Mac, and Linux.Type-SafetyC# is a statically typed language. That means the types are verified when you compile a program. This eliminates a large set of errors before the program even runs.Garbage CollectionAutomatic memory management is an essential feature of C#. It has a garbage collector that runs along with the programs, reclaiming the unused memory. This frees the burden from programmers to ...

Read More
Showing 21–23 of 23 articles
« Prev 1 2 3 Next »
Advertisements