
Tag: QnA
-
What is garbage collection in .NET?
Read More: What is garbage collection in .NET?Automatic memory management by the CLR. Process: Benefits: Prevents memory leaks and simplifies memory management.
-
What is the difference between value types and reference types?
Read More: What is the difference between value types and reference types?Value types: Example: Reference types: Store a reference (memory address) to the data on the heap. Examples include string, class, and arrays. Assigning a reference type copies the reference, not the data itself. Example:
-
What is the Common Language Specification (CLS)?
Read More: What is the Common Language Specification (CLS)?A subset of the CTS that provides guidelines for language compilers.
-
What is the Common Type System (CTS)?
Read More: What is the Common Type System (CTS)?The CTS defines the rules for declaring and using data types in .NET.Purpose: Ensures that different .NET languages can work together seamlessly. Key Aspects: Example: Both C# and VB.NET can use the int data type because it’s defined in the CTS.
-
What is the Common Language Runtime (CLR)?
Read More: What is the Common Language Runtime (CLR)?The CLR is the heart of the .NET execution environment. Think of it as a virtual machine that manages .NET applications. Key Functions:
-
What is the difference between string and StringBuilder in C#?
Read More: What is the difference between string and StringBuilder in C#?string is an immutable type, meaning its value cannot be changed after it is created. When you modify a string, a new string object is created. StringBuilder is a mutable type, meaning its value can be changed without creating a new object. This makes it more efficient for operations that involve frequent string modifications.
-
What is the difference between char and varchar in SQL Server?
Read More: What is the difference between char and varchar in SQL Server?char is a fixed-length character data type. It stores a specified number of characters, padding with spaces if the value is shorter than the specified length. varchar is a variable-length character data type. It stores a variable number of characters, up to the specified maximum length.