Category: C#
C# Compiler Error – CS1626 cannot yield a value in the body of a tr
In this blog post, you’ll learn more about the C# Compiler Error – CS1626 and the related message description C# Compiler Error Code CS1626 C# Compiler Description for the Code :CS1626 Cannot yield a value in the body of a try block with a catch clause
How to populate XDocument from a String in C# ?
Want to load or populate XDocument from a string in C# ? . Use the Parse method defined in the XDocument class as demonstrated below. How to populate XDocument from a String in C# ?
C# Compiler Error – CS0611 array elements cannot be of type ‘{0}’
In this blog post, you’ll learn more about the C# Compiler Error – CS0611 and the related message description C# Compiler Error Code CS0611 C# Compiler Description for the Code :CS0611 Array elements cannot be of type ‘{0}’
C# Compiler Error – CS1547 keyword ‘void’ cannot be used in this co
In this blog post, you’ll learn more about the C# Compiler Error – CS1547 and the related message description C# Compiler Error Code CS1547 C# Compiler Description for the Code :CS1547 Keyword ‘void’ cannot be used in this context
C# Compiler Error – CS8153 an expression tree lambda may not contai
In this blog post, you’ll learn more about the C# Compiler Error – CS8153 and the related message description C# Compiler Error Code CS8153 C# Compiler Description for the Code :CS8153 An expression tree lambda may not contain a call to a method, property, or indexer that returns by reference
C# Compiler Error – CS0557 duplicate user-defined conversion in typ
In this blog post, you’ll learn more about the C# Compiler Error – CS0557 and the related message description C# Compiler Error Code CS0557 C# Compiler Description for the Code :CS0557 Duplicate user-defined conversion in type ‘{0}’
C# Compiler Error – CS1908 the type of the argument to the defaultp
In this blog post, you’ll learn more about the C# Compiler Error – CS1908 and the related message description C# Compiler Error Code CS1908 C# Compiler Description for the Code :CS1908 The type of the argument to the DefaultParameterValue attribute must match the parameter type
C# Compiler Error – CS5001 program does not contain a static ‘main’
In this blog post, you’ll learn more about the C# Compiler Error – CS5001 and the related message description C# Compiler Error Code CS5001 C# Compiler Description for the Code :CS5001 Program does not contain a static ‘Main’ method suitable for an entry point
C# Compiler Error – CS8867 no accessible copy constructor found in
In this blog post, you’ll learn more about the C# Compiler Error – CS8867 and the related message description C# Compiler Error Code CS8867 C# Compiler Description for the Code :CS8867 No accessible copy constructor found in base type ‘{0}’.
C# Compiler Error – CS8356 predefined type ‘{0}’ is declared in mul
In this blog post, you’ll learn more about the C# Compiler Error – CS8356 and the related message description C# Compiler Error Code CS8356 C# Compiler Description for the Code :CS8356 Predefined type ‘{0}’ is declared in multiple referenced assemblies: ‘{1}’ and ‘{2}’
How to Convert XDocument to XmlDocument in C# ?
To convert an XmlDocument to XDocument , you can use the CreateReader method of the XDocument and load it in to the XmlDocument. How to Convert XDocument to XmlDocument in C# ?
C# Compiler Error – CS8831 ‘{0}’: target runtime doesn’t support co
In this blog post, you’ll learn more about the C# Compiler Error – CS8831 and the related message description C# Compiler Error Code CS8831 C# Compiler Description for the Code :CS8831 ‘{0}’: Target runtime doesn’t support covariant types in overrides. Type must be ‘{2}’ to match overridden member ‘{1}’
C# Compiler Error – CS0451 the ‘new()’ constraint cannot be used wi
In this blog post, you’ll learn more about the C# Compiler Error – CS0451 and the related message description C# Compiler Error Code CS0451 C# Compiler Description for the Code :CS0451 The ‘new()’ constraint cannot be used with the ‘struct’ constraint
C# Compiler Error – CS1520 method must have a return type
In this blog post, you’ll learn more about the C# Compiler Error – CS1520 and the related message description C# Compiler Error Code CS1520 C# Compiler Description for the Code :CS1520 Method must have a return type
C# Compiler Error – CS1726 friend assembly reference ‘{0}’ is inval
In this blog post, you’ll learn more about the C# Compiler Error – CS1726 and the related message description C# Compiler Error Code CS1726 C# Compiler Description for the Code :CS1726 Friend assembly reference ‘{0}’ is invalid. Strong-name signed assemblies must specify a public key in their InternalsVisibleTo declarations.
C# Compiler Error – CS0562 the parameter of a unary operator must b
In this blog post, you’ll learn more about the C# Compiler Error – CS0562 and the related message description C# Compiler Error Code CS0562 C# Compiler Description for the Code :CS0562 The parameter of a unary operator must be the containing type
C# Compiler Error – CS0315 the type ‘{3}’ cannot be used as type pa
In this blog post, you’ll learn more about the C# Compiler Error – CS0315 and the related message description C# Compiler Error Code CS0315 C# Compiler Description for the Code :CS0315 The type ‘{3}’ cannot be used as type parameter ‘{2}’ in the generic type or method ‘{0}’. There is no boxing conversion from ‘{3}’ to ‘{1}’.
C# Compiler Error – CS8879 record member ‘{0}’ must be private.
In this blog post, you’ll learn more about the C# Compiler Error – CS8879 and the related message description C# Compiler Error Code CS8879 C# Compiler Description for the Code :CS8879 Record member ‘{0}’ must be private.
Documentation Comments in C#
In C# , you can create the Documentation Comments for your code using the predefined XML tags before the class or the block of the code thay refer to. For example namespace WindowsFormsApplication1 { /// <summary> /// This is a test Class Form1 /// </summary> public partial class Form1 : Form { /// <summary> /// Constructor for the…
C# Compiler Warning – CS3015 ‘{0}’ has no accessible constructors whi
In this blog post, you’ll learn more about the C# Compiler Warning – CS3015 and the related message description C# Compiler Warning Code CS3015 C# Compiler Description for the Code :CS3015 ‘{0}’ has no accessible constructors which use only CLS-compliant types