Category: C#
How to Get the Property value using reflection in C# ?
Below is a sample method that demonstrates how to retrieve the property value in C# using reflection. How to Get the Property value using reflection in C# ?
How to Get the Last N Elements from a List using LINQ in C#?
Below is a sample code snippet demonstrating how to retrieve last N Elements (2) from a list in C# using LINQ.
C# Compiler Fatal – CS0041 unexpected error writing debug informati
In this blog post, you’ll learn more about the C# Compiler Fatal – CS0041 and the related message description C# Compiler Fatal Code CS0041 C# Compiler Description for the Code :CS0041 Unexpected error writing debug information — ‘{0}’
C# Compiler Error – CS8320 feature ‘{0}’ is not available in c# 7.2
In this blog post, you’ll learn more about the C# Compiler Error – CS8320 and the related message description C# Compiler Error Code CS8320 C# Compiler Description for the Code :CS8320 Feature ‘{0}’ is not available in C# 7.2. Please use language version {1} or greater.
C# Compiler Error – CS1540 cannot access protected member ‘{0}’ via
In this blog post, you’ll learn more about the C# Compiler Error – CS1540 and the related message description C# Compiler Error Code CS1540 C# Compiler Description for the Code :CS1540 Cannot access protected member ‘{0}’ via a qualifier of type ‘{1}’; the qualifier must be of type ‘{2}’ (or derived from it)
Using String.Format method in C# to add commas in thousands place for a Number
If you need to add a comma in the thousands place for a number using the String.Format method in C# , you can use the format specifier N as shown in the below code snippet. Using String.Format method in C# to add commas in thousands place for a Number
C# Compiler Error – CS8668 expected ‘warnings’, ‘annotations’, or e
In this blog post, you’ll learn more about the C# Compiler Error – CS8668 and the related message description C# Compiler Error Code CS8668 C# Compiler Description for the Code :CS8668 Expected ‘warnings’, ‘annotations’, or end of directive
C# Compiler Warning – CS3014 ‘{0}’ cannot be marked as cls-compliant
In this blog post, you’ll learn more about the C# Compiler Warning – CS3014 and the related message description C# Compiler Warning Code CS3014 C# Compiler Description for the Code :CS3014 ‘{0}’ cannot be marked as CLS-compliant because the assembly does not have a CLSCompliant attribute
C# Compiler Error – CS0171 field ‘{0}’ must be fully assigned befor
In this blog post, you’ll learn more about the C# Compiler Error – CS0171 and the related message description C# Compiler Error Code CS0171 C# Compiler Description for the Code :CS0171 Field ‘{0}’ must be fully assigned before control is returned to the caller
C# Compiler Error – CS1551 indexers must have at least one paramete
In this blog post, you’ll learn more about the C# Compiler Error – CS1551 and the related message description C# Compiler Error Code CS1551 C# Compiler Description for the Code :CS1551 Indexers must have at least one parameter
Deferred Execution Example in LINQ and C#
The Query Operators are executed only when enumerated except few scenarios. For example, when you use the for/Foreach statement and iterate the items from the query result. Below is a sample code demonstrating the Deferred Execution in C#. Deferred Execution Example in LINQ and C#
C# Compiler Error – CS1945 an expression tree may not contain an an
In this blog post, you’ll learn more about the C# Compiler Error – CS1945 and the related message description C# Compiler Error Code CS1945 C# Compiler Description for the Code :CS1945 An expression tree may not contain an anonymous method expression