Category: C#
C# Compiler Error – CS8804 cannot specify /main if there is a compi
In this blog post, you’ll learn more about the C# Compiler Error – CS8804 and the related message description C# Compiler Error Code CS8804 C# Compiler Description for the Code :CS8804 Cannot specify /main if there is a compilation unit with top-level statements.
C# Compiler Error – CS7012 the name ‘{0}’ does not exist in the cur
In this blog post, you’ll learn more about the C# Compiler Error – CS7012 and the related message description C# Compiler Error Code CS7012 C# Compiler Description for the Code :CS7012 The name ‘{0}’ does not exist in the current context (are you missing a reference to assembly ‘{1}’?)
C# Compiler Error – CS1980 cannot define a class or member that uti
In this blog post, you’ll learn more about the C# Compiler Error – CS1980 and the related message description C# Compiler Error Code CS1980 C# Compiler Description for the Code :CS1980 Cannot define a class or member that utilizes ‘dynamic’ because the compiler required type ‘{0}’ cannot be found. Are you missing a reference?
C# Compiler Error – CS4007 ‘await’ cannot be used in an expression
In this blog post, you’ll learn more about the C# Compiler Error – CS4007 and the related message description C# Compiler Error Code CS4007 C# Compiler Description for the Code :CS4007 ‘await’ cannot be used in an expression containing the type ‘{0}’
C# Compiler Error – CS8926 a static abstract interface member can b
In this blog post, you’ll learn more about the C# Compiler Error – CS8926 and the related message description C# Compiler Error Code CS8926 C# Compiler Description for the Code :CS8926 A static abstract interface member can be accessed only on a type parameter.
C# Compiler Error – CS1910 argument of type ‘{0}’ is not applicable
In this blog post, you’ll learn more about the C# Compiler Error – CS1910 and the related message description C# Compiler Error Code CS1910 C# Compiler Description for the Code :CS1910 Argument of type ‘{0}’ is not applicable for the DefaultParameterValue attribute
Convert Value type to String in C#
Below is a sample sourecode snippet demonstrating how to Convert Value type to String in C#
C# Compiler Error – CS8308 do not use refout when using refonly.
In this blog post, you’ll learn more about the C# Compiler Error – CS8308 and the related message description C# Compiler Error Code CS8308 C# Compiler Description for the Code :CS8308 Do not use refout when using refonly.
C# Compiler Error – CS7064 error opening icon file {0} — {1}
In this blog post, you’ll learn more about the C# Compiler Error – CS7064 and the related message description C# Compiler Error Code CS7064 C# Compiler Description for the Code :CS7064 Error opening icon file {0} — {1}
How to Convert Enum to Integer in C# ?
Below is a sample sourcecode that demonstrates how to Convert Enum to Integer in C# ?
Example for Multiple Levels of Namespace
using System; using System.Collections.Generic; using System.IO; using System.Linq; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; namespace App2 { namespace App1 { namespace App3 { class A { } } } }
C# Compiler Error – CS8792 an expression tree may not contain a ran
In this blog post, you’ll learn more about the C# Compiler Error – CS8792 and the related message description C# Compiler Error Code CS8792 C# Compiler Description for the Code :CS8792 An expression tree may not contain a range (‘..’) expression.
C# Compiler Error – CS2035 command-line syntax error: missing ‘:’ f
In this blog post, you’ll learn more about the C# Compiler Error – CS2035 and the related message description C# Compiler Error Code CS2035 C# Compiler Description for the Code :CS2035 Command-line syntax error: Missing ‘:’ for ‘{0}’ option
How to rethrow InnnerException without losing Stack Trace in C# ?
Microsoft .NET Framework 4.5 introduced the ExceptionDispatchInfo class which lets the developers to capture an exception and rethrow it without losing the stack trace. How to rethrow InnnerException without losing Stack Trace in C# ? Below is a sample code snippet demonstrating the usage of this class.
C# Compiler Error – CS7047 attribute parameter ‘{0}’ or ‘{1}’ must
In this blog post, you’ll learn more about the C# Compiler Error – CS7047 and the related message description C# Compiler Error Code CS7047 C# Compiler Description for the Code :CS7047 Attribute parameter ‘{0}’ or ‘{1}’ must be specified.
C# Compiler Error – CS8640 expression tree cannot contain value of
In this blog post, you’ll learn more about the C# Compiler Error – CS8640 and the related message description C# Compiler Error Code CS8640 C# Compiler Description for the Code :CS8640 Expression tree cannot contain value of ref struct or restricted type ‘{0}’.
C# Compiler Error – CS8876 ‘{0}’ does not override expected propert
In this blog post, you’ll learn more about the C# Compiler Error – CS8876 and the related message description C# Compiler Error Code CS8876 C# Compiler Description for the Code :CS8876 ‘{0}’ does not override expected property from ‘{1}’.
C# Compiler Error – CS0703 inconsistent accessibility: constraint t
In this blog post, you’ll learn more about the C# Compiler Error – CS0703 and the related message description C# Compiler Error Code CS0703 C# Compiler Description for the Code :CS0703 Inconsistent accessibility: constraint type ‘{1}’ is less accessible than ‘{0}’
C# Compiler Error – CS1984 cannot await in the body of a finally cl
In this blog post, you’ll learn more about the C# Compiler Error – CS1984 and the related message description C# Compiler Error Code CS1984 C# Compiler Description for the Code :CS1984 Cannot await in the body of a finally clause
C# Compiler Error – CS0178 invalid rank specifier: expected ‘,’ or
In this blog post, you’ll learn more about the C# Compiler Error – CS0178 and the related message description C# Compiler Error Code CS0178 C# Compiler Description for the Code :CS0178 Invalid rank specifier: expected ‘,’ or ‘]’