Category: C#
C# Compiler Error – CS7015 ‘extern alias’ is not valid in this cont
In this blog post, you’ll learn more about the C# Compiler Error – CS7015 and the related message description C# Compiler Error Code CS7015 C# Compiler Description for the Code :CS7015 ‘extern alias’ is not valid in this context
C# Compiler Warning – CS8601 possible null reference assignment.
In this blog post, you’ll learn more about the C# Compiler Warning – CS8601 and the related message description C# Compiler Warning Code CS8601 C# Compiler Description for the Code :CS8601 Possible null reference assignment.
C# Compiler Error – CS8924 one of the parameters of a binary operat
In this blog post, you’ll learn more about the C# Compiler Error – CS8924 and the related message description C# Compiler Error Code CS8924 C# Compiler Description for the Code :CS8924 One of the parameters of a binary operator must be the containing type, or its type parameter constrained to it.
How to make a Type Sortable in C# using IComparable interface?
Assume that you have a type which would be stored in a List. You would want to use List.Sort method to sort your data in the List. For example , assume that you have to store objects of type Employee in List<Employee> and sort the List by Age using the Sort method. To do this , we can use he IComparable<T> interface. How to make…
C# Compiler Warning – CS8360 filter expression is a constant ‘false’,
In this blog post, you’ll learn more about the C# Compiler Warning – CS8360 and the related message description C# Compiler Warning Code CS8360 C# Compiler Description for the Code :CS8360 Filter expression is a constant ‘false’, consider removing the try-catch block
C# Compiler Error – CS1585 member modifier ‘{0}’ must precede the m
In this blog post, you’ll learn more about the C# Compiler Error – CS1585 and the related message description C# Compiler Error Code CS1585 C# Compiler Description for the Code :CS1585 Member modifier ‘{0}’ must precede the member type and name
C# Compiler Error – CS0304 cannot create an instance of the variabl
In this blog post, you’ll learn more about the C# Compiler Error – CS0304 and the related message description C# Compiler Error Code CS0304 C# Compiler Description for the Code :CS0304 Cannot create an instance of the variable type ‘{0}’ because it does not have the new() constraint
C# Compiler Error – CS0694 type parameter ‘{0}’ has the same name a
In this blog post, you’ll learn more about the C# Compiler Error – CS0694 and the related message description C# Compiler Error Code CS0694 C# Compiler Description for the Code :CS0694 Type parameter ‘{0}’ has the same name as the containing type, or method
C# Compiler Error – CS7034 the specified version string does not co
In this blog post, you’ll learn more about the C# Compiler Error – CS7034 and the related message description C# Compiler Error Code CS7034 C# Compiler Description for the Code :CS7034 The specified version string does not conform to the required format – major[.minor[.build[.revision]]]
C# Compiler Error – CS0191 a readonly field cannot be assigned to (
In this blog post, you’ll learn more about the C# Compiler Error – CS0191 and the related message description C# Compiler Error Code CS0191 C# Compiler Description for the Code :CS0191 A readonly field cannot be assigned to (except in a constructor or init-only setter of the type in which the field is defined or a variable initializer)
Example of Delegates in C#
Delegates in C# is simply a reference/pointer to a function . One of the typical usage of the delegates is the event handlers in .NET. Example of Delegates in C# Below is a sample code snippet demonstrating the usage of delegates to add and subtract 2 numbers.
C# Compiler Error – CS1599 the return type of a method, delegate, o
In this blog post, you’ll learn more about the C# Compiler Error – CS1599 and the related message description C# Compiler Error Code CS1599 C# Compiler Description for the Code :CS1599 The return type of a method, delegate, or function pointer cannot be ‘{0}’