Category: C#
C# Compiler Error – CS8821 a static anonymous function cannot conta
In this blog post, you’ll learn more about the C# Compiler Error – CS8821 and the related message description C# Compiler Error Code CS8821 C# Compiler Description for the Code :CS8821 A static anonymous function cannot contain a reference to ‘this’ or ‘base’.
Visual Assets Tab in Package Manifest file
The Visual Assets tab in the package manifest file lets the developers set the characteristics of the application’s title , splash screen and the images used within the application for various scenario. You will be able to specify the splash screen for your Windows Phone and Windows Store separately because the dimensions are different for phone and the tablet app. The Splash screen for the…
How to get the column names from a SqlDataReader in C#?
There are times when you might want to connect to a database and then get all the column names that was returned in the SqlDataReader object. How to get the column names from a SqlDataReader in C#? Here’s a code snippet demonstrating how to do it.
C# Compiler Error – CS0695 ‘{0}’ cannot implement both ‘{1}’ and ‘{
In this blog post, you’ll learn more about the C# Compiler Error – CS0695 and the related message description C# Compiler Error Code CS0695 C# Compiler Description for the Code :CS0695 ‘{0}’ cannot implement both ‘{1}’ and ‘{2}’ because they may unify for some type parameter substitutions
C# Compiler Error – CS1971 the call to method ‘{0}’ needs to be dyn
In this blog post, you’ll learn more about the C# Compiler Error – CS1971 and the related message description C# Compiler Error Code CS1971 C# Compiler Description for the Code :CS1971 The call to method ‘{0}’ needs to be dynamically dispatched, but cannot be because it is part of a base access expression. Consider casting the dynamic arguments or eliminating the base access.
C# Compiler Error – CS1565 conflicting options specified: win32 res
In this blog post, you’ll learn more about the C# Compiler Error – CS1565 and the related message description C# Compiler Error Code CS1565 C# Compiler Description for the Code :CS1565 Conflicting options specified: Win32 resource file; Win32 icon
C# Compiler Error – CS0101 the namespace ‘{1}’ already contains a d
In this blog post, you’ll learn more about the C# Compiler Error – CS0101 and the related message description C# Compiler Error Code CS0101 C# Compiler Description for the Code :CS0101 The namespace ‘{1}’ already contains a definition for ‘{0}’
Using the Namespace Alias Qualifier in C#
One of the advantages of the Namespace is the organization of your code and structure . You could use the Namespace Alias Qualifier that allows the developers to replace the namespace names with the alias so that the ambigous definitions of the classes/namespaces are prevented. An sample example of the Ambigous definition os class is below using System; using System.Collections.Generic; using System.Linq; using System.Text; using…
Initialize Read-only Properties from Constructor in C# 6.0
C# 6.0 lets the developers to initialize the read only properties directly when declaring them . Since it is a read-only property , it behaves the same as read only variable where you can initialize the read-only auto properties from a constructor. Initialize Read-only Properties from Constructor in C# 6.0 Below is a sample code snippet demonstrating how to initialize read-only properties from constructor in…
C# Compiler Error – CS8935 the asyncmethodbuilder attribute is disa
In this blog post, you’ll learn more about the C# Compiler Error – CS8935 and the related message description C# Compiler Error Code CS8935 C# Compiler Description for the Code :CS8935 The AsyncMethodBuilder attribute is disallowed on anonymous methods without an explicit return type.
C# Compiler Error – CS7066 yield statements may not appear at the t
In this blog post, you’ll learn more about the C# Compiler Error – CS7066 and the related message description C# Compiler Error Code CS7066 C# Compiler Description for the Code :CS7066 Yield statements may not appear at the top level in interactive code.
C# Compiler Error – CS8023 feature ‘{0}’ is not available in c# 2.
In this blog post, you’ll learn more about the C# Compiler Error – CS8023 and the related message description C# Compiler Error Code CS8023 C# Compiler Description for the Code :CS8023 Feature ‘{0}’ is not available in C# 2. Please use language version {1} or greater.
C# Compiler Error – CS1650 fields of static readonly field ‘{0}’ ca
In this blog post, you’ll learn more about the C# Compiler Error – CS1650 and the related message description C# Compiler Error Code CS1650 C# Compiler Description for the Code :CS1650 Fields of static readonly field ‘{0}’ cannot be assigned to (except in a static constructor or a variable initializer)
C# Compiler Error – CS0517 ‘{0}’ has no base class and cannot call
In this blog post, you’ll learn more about the C# Compiler Error – CS0517 and the related message description C# Compiler Error Code CS0517 C# Compiler Description for the Code :CS0517 ‘{0}’ has no base class and cannot call a base constructor
C# Compiler Error – CS1932 cannot assign {0} to a range variable
In this blog post, you’ll learn more about the C# Compiler Error – CS1932 and the related message description C# Compiler Error Code CS1932 C# Compiler Description for the Code :CS1932 Cannot assign {0} to a range variable
C# Compiler Error – CS8036 error reading debug information for ‘{0}
In this blog post, you’ll learn more about the C# Compiler Error – CS8036 and the related message description C# Compiler Error Code CS8036 C# Compiler Description for the Code :CS8036 Error reading debug information for ‘{0}’
C# Compiler Error – CS0250 do not directly call your base type fina
In this blog post, you’ll learn more about the C# Compiler Error – CS0250 and the related message description C# Compiler Error Code CS0250 C# Compiler Description for the Code :CS0250 Do not directly call your base type Finalize method. It is called automatically from your destructor.
C# Compiler Warning – CS8860 types and aliases should not be named ‘r
In this blog post, you’ll learn more about the C# Compiler Warning – CS8860 and the related message description C# Compiler Warning Code CS8860 C# Compiler Description for the Code :CS8860 Types and aliases should not be named ‘record’.
C# Compiler Error – CS1759 cannot embed interop types from assembly
In this blog post, you’ll learn more about the C# Compiler Error – CS1759 and the related message description C# Compiler Error Code CS1759 C# Compiler Description for the Code :CS1759 Cannot embed interop types from assembly ‘{0}’ because it is missing either the ‘{1}’ attribute or the ‘{2}’ attribute.
C# Compiler Error – CS0701 ‘{0}’ is not a valid constraint. a type
In this blog post, you’ll learn more about the C# Compiler Error – CS0701 and the related message description C# Compiler Error Code CS0701 C# Compiler Description for the Code :CS0701 ‘{0}’ is not a valid constraint. A type used as a constraint must be an interface, a non-sealed class or a type parameter.