Category: C#
Display the Command line parameters of the Main Method in C#
The Main Method in C# accepts the parameters of string Array. You could easily display the list of parameters of the Main Method in C# by using a for/foreach loop and display the parameters like the example show below using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication4 { class Program { static void Main(string[] args) { foreach (string…
C# Compiler Error – CS8084 type parameters are not allowed on a met
In this blog post, you’ll learn more about the C# Compiler Error – CS8084 and the related message description C# Compiler Error Code CS8084 C# Compiler Description for the Code :CS8084 Type parameters are not allowed on a method group as an argument to ‘nameof’.
C# Compiler Error – CS0709 ‘{1}’: cannot derive from static class ‘
In this blog post, you’ll learn more about the C# Compiler Error – CS0709 and the related message description C# Compiler Error Code CS0709 C# Compiler Description for the Code :CS0709 ‘{1}’: cannot derive from static class ‘{0}’
C# Compiler Error – CS8378 __arglist cannot have an argument passed
In this blog post, you’ll learn more about the C# Compiler Error – CS8378 and the related message description C# Compiler Error Code CS8378 C# Compiler Description for the Code :CS8378 __arglist cannot have an argument passed by ‘in’ or ‘out’
C# Compiler Error – CS1967 constraint cannot be the dynamic type
In this blog post, you’ll learn more about the C# Compiler Error – CS1967 and the related message description C# Compiler Error Code CS1967 C# Compiler Description for the Code :CS1967 Constraint cannot be the dynamic type
Example of Object Initializer in C#
Object Initializer is one of the cool features in C# that lets the developers to initialize the objects as and when they are declared . Example of Object Initialize in C# Below is a sample code snippet that demonstrates how to use Object Initializers in C#.
C# Compiler Error – CS2042 invalid debug information format: {0}
In this blog post, you’ll learn more about the C# Compiler Error – CS2042 and the related message description C# Compiler Error Code CS2042 C# Compiler Description for the Code :CS2042 Invalid debug information format: {0}
C# Compiler Error – CS1728 cannot bind delegate to ‘{0}’ because it
In this blog post, you’ll learn more about the C# Compiler Error – CS1728 and the related message description C# Compiler Error Code CS1728 C# Compiler Description for the Code :CS1728 Cannot bind delegate to ‘{0}’ because it is a member of ‘System.Nullable’
C# Compiler Error – CS8379 type parameter ‘{1}’ has the ‘unmanaged’
In this blog post, you’ll learn more about the C# Compiler Error – CS8379 and the related message description C# Compiler Error Code CS8379 C# Compiler Description for the Code :CS8379 Type parameter ‘{1}’ has the ‘unmanaged’ constraint so ‘{1}’ cannot be used as a constraint for ‘{0}’
C# Compiler Error – CS1951 an expression tree lambda may not contai
In this blog post, you’ll learn more about the C# Compiler Error – CS1951 and the related message description C# Compiler Error Code CS1951 C# Compiler Description for the Code :CS1951 An expression tree lambda may not contain a ref, in or out parameter
C# Compiler Error – CS8090 there is an error in a referenced assemb
In this blog post, you’ll learn more about the C# Compiler Error – CS8090 and the related message description C# Compiler Error Code CS8090 C# Compiler Description for the Code :CS8090 There is an error in a referenced assembly ‘{0}’.
C# Compiler Warning – CS0658 ‘{0}’ is not a recognized attribute loca
In this blog post, you’ll learn more about the C# Compiler Warning – CS0658 and the related message description C# Compiler Warning Code CS0658 C# Compiler Description for the Code :CS0658 ‘{0}’ is not a recognized attribute location. Valid attribute locations for this declaration are ‘{1}’. All attributes in this block will be ignored.
C# Compiler Error – CS0579 duplicate ‘{0}’ attribute
In this blog post, you’ll learn more about the C# Compiler Error – CS0579 and the related message description C# Compiler Error Code CS0579 C# Compiler Description for the Code :CS0579 Duplicate ‘{0}’ attribute
C# Compiler Warning – CS8886 use of unassigned out parameter ‘{0}’
In this blog post, you’ll learn more about the C# Compiler Warning – CS8886 and the related message description C# Compiler Warning Code CS8886 C# Compiler Description for the Code :CS8886 Use of unassigned out parameter ‘{0}’
C# Compiler Error – CS0501 ‘{0}’ must declare a body because it is
In this blog post, you’ll learn more about the C# Compiler Error – CS0501 and the related message description C# Compiler Error Code CS0501 C# Compiler Description for the Code :CS0501 ‘{0}’ must declare a body because it is not marked abstract, extern, or partial
C# Compiler Error – CS8055 cannot emit debug information for a sour
In this blog post, you’ll learn more about the C# Compiler Error – CS8055 and the related message description C# Compiler Error Code CS8055 C# Compiler Description for the Code :CS8055 Cannot emit debug information for a source text without encoding.
C# Compiler Error – CS0621 ‘{0}’: virtual or abstract members canno
In this blog post, you’ll learn more about the C# Compiler Error – CS0621 and the related message description C# Compiler Error Code CS0621 C# Compiler Description for the Code :CS0621 ‘{0}’: virtual or abstract members cannot be private
C# Compiler Error – CS1018 keyword ‘this’ or ‘base’ expected
In this blog post, you’ll learn more about the C# Compiler Error – CS1018 and the related message description C# Compiler Error Code CS1018 C# Compiler Description for the Code :CS1018 Keyword ‘this’ or ‘base’ expected
C# Compiler Error – CS8089 empty format specifier.
In this blog post, you’ll learn more about the C# Compiler Error – CS8089 and the related message description C# Compiler Error Code CS8089 C# Compiler Description for the Code :CS8089 Empty format specifier.
Collection Initialization Example in C#
Sample code snippet to demonstrate the Collection Initialization in C#. Collection Initialization Example in C#