Category: C#
How to Declare an Enumeration with Explicit Values in C# ?
There are times when you want to have a specific values to the enumeration to the enum items . For example , if you need to match particular values from the database or from a web service etc. How to Declare an Enumeration with Explicit Values in C# ? Below is a sample code snippet that demonstrates how to declare an enum with explicit values…
How to get the Names of all the columns from a SqlDataReader object in C# ?
Here’s a simple code snippet that demonstrates how to retreive all the column names from a SqlDataReader object in C#. How to get the Names of all the columns from a SqlDataReader object in C# ?
C# Compiler Error – CS0418 ‘{0}’: an abstract type cannot be sealed
In this blog post, you’ll learn more about the C# Compiler Error – CS0418 and the related message description C# Compiler Error Code CS0418 C# Compiler Description for the Code :CS0418 ‘{0}’: an abstract type cannot be sealed or static
C# Compiler Error – CS8712 ‘{0}’: abstract event cannot use event a
In this blog post, you’ll learn more about the C# Compiler Error – CS8712 and the related message description C# Compiler Error Code CS8712 C# Compiler Description for the Code :CS8712 ‘{0}’: abstract event cannot use event accessor syntax
C# Program to swap two numbers without using temporary variable
Problem Write a program in Visual CSharp to swap two numbers using temporary variable and display the result in the console window. How to swap two numbers in C# without using temporary variable ? Output Abundantcode.com coding sample Enter the First Number : 45 Enter the Second Number : 67 First Number is 67 Second Number is 45
C# Compiler Error – CS1068 the type name ‘{0}’ could not be found i
In this blog post, you’ll learn more about the C# Compiler Error – CS1068 and the related message description C# Compiler Error Code CS1068 C# Compiler Description for the Code :CS1068 The type name ‘{0}’ could not be found in the global namespace. This type has been forwarded to assembly ‘{1}’ Consider adding a reference to that assembly.
C# Compiler Error – CS1605 cannot use ‘{0}’ as a ref or out value b
In this blog post, you’ll learn more about the C# Compiler Error – CS1605 and the related message description C# Compiler Error Code CS1605 C# Compiler Description for the Code :CS1605 Cannot use ‘{0}’ as a ref or out value because it is read-only
C# Compiler Error – CS8189 ref mismatch between ‘{0}’ and delegate
In this blog post, you’ll learn more about the C# Compiler Error – CS8189 and the related message description C# Compiler Error Code CS8189 C# Compiler Description for the Code :CS8189 Ref mismatch between ‘{0}’ and delegate ‘{1}’
C# Compiler Error – CS1621 the yield statement cannot be used insid
In this blog post, you’ll learn more about the C# Compiler Error – CS1621 and the related message description C# Compiler Error Code CS1621 C# Compiler Description for the Code :CS1621 The yield statement cannot be used inside an anonymous method or lambda expression
C# Compiler Warning – CS8770 method ‘{0}’ lacks [doesnotreturn] annot
In this blog post, you’ll learn more about the C# Compiler Warning – CS8770 and the related message description C# Compiler Warning Code CS8770 C# Compiler Description for the Code :CS8770 Method ‘{0}’ lacks [DoesNotReturn] annotation to match implemented or overridden member.
C# Compiler Error – CS0641 attribute ‘{0}’ is only valid on classes
In this blog post, you’ll learn more about the C# Compiler Error – CS0641 and the related message description C# Compiler Error Code CS0641 C# Compiler Description for the Code :CS0641 Attribute ‘{0}’ is only valid on classes derived from System.Attribute
C# Compiler Error – CS8340 instance fields of readonly structs must
In this blog post, you’ll learn more about the C# Compiler Error – CS8340 and the related message description C# Compiler Error Code CS8340 C# Compiler Description for the Code :CS8340 Instance fields of readonly structs must be readonly.