Category: C#
C# Compiler Error – CS0578 the conditional attribute is not valid o
In this blog post, you’ll learn more about the C# Compiler Error – CS0578 and the related message description C# Compiler Error Code CS0578 C# Compiler Description for the Code :CS0578 The Conditional attribute is not valid on ‘{0}’ because its return type is not void
C# Compiler Error – CS8156 an expression cannot be used in this con
In this blog post, you’ll learn more about the C# Compiler Error – CS8156 and the related message description C# Compiler Error Code CS8156 C# Compiler Description for the Code :CS8156 An expression cannot be used in this context because it may not be passed or returned by reference
C# Compiler Warning – CS8618 non-nullable {0} ‘{1}’ must contain a no
In this blog post, you’ll learn more about the C# Compiler Warning – CS8618 and the related message description C# Compiler Warning Code CS8618 C# Compiler Description for the Code :CS8618 Non-nullable {0} ‘{1}’ must contain a non-null value when exiting constructor. Consider declaring the {0} as nullable.
C# Compiler Error – CS0269 use of unassigned out parameter ‘{0}’
In this blog post, you’ll learn more about the C# Compiler Error – CS0269 and the related message description C# Compiler Error Code CS0269 C# Compiler Description for the Code :CS0269 Use of unassigned out parameter ‘{0}’
C# Compiler Error – CS0564 the first operand of an overloaded shift
In this blog post, you’ll learn more about the C# Compiler Error – CS0564 and the related message description C# Compiler Error Code CS0564 C# Compiler Description for the Code :CS0564 The first operand of an overloaded shift operator must have the same type as the containing type, and the type of the second operand must be int
C# Compiler Error – CS8637 expected ‘enable’, ‘disable’, or ‘restor
In this blog post, you’ll learn more about the C# Compiler Error – CS8637 and the related message description C# Compiler Error Code CS8637 C# Compiler Description for the Code :CS8637 Expected ‘enable’, ‘disable’, or ‘restore’
C# Compiler Error – CS8112 local function ‘{0}’ must declare a body
In this blog post, you’ll learn more about the C# Compiler Error – CS8112 and the related message description C# Compiler Error Code CS8112 C# Compiler Description for the Code :CS8112 Local function ‘{0}’ must declare a body because it is not marked ‘static extern’.
C# Compiler Error – CS1991 ‘{0}’ cannot implement ‘{1}’ because ‘{2
In this blog post, you’ll learn more about the C# Compiler Error – CS1991 and the related message description C# Compiler Error Code CS1991 C# Compiler Description for the Code :CS1991 ‘{0}’ cannot implement ‘{1}’ because ‘{2}’ is a Windows Runtime event and ‘{3}’ is a regular .NET event.
C# Compiler Error – CS0722 ‘{0}’: static types cannot be used as re
In this blog post, you’ll learn more about the C# Compiler Error – CS0722 and the related message description C# Compiler Error Code CS0722 C# Compiler Description for the Code :CS0722 ‘{0}’: static types cannot be used as return types
C# Compiler Error – CS1513 } expected
In this blog post, you’ll learn more about the C# Compiler Error – CS1513 and the related message description C# Compiler Error Code CS1513 C# Compiler Description for the Code :CS1513 } expected
C# Compiler Error – CS0154 the property or indexer ‘{0}’ cannot be
In this blog post, you’ll learn more about the C# Compiler Error – CS0154 and the related message description C# Compiler Error Code CS0154 C# Compiler Description for the Code :CS0154 The property or indexer ‘{0}’ cannot be used in this context because it lacks the get accessor
How to Combine a Filename with a Directory in C# ?
If you need to combine the filename with a directory name in C# , use the built in Path class to do it instead of doing it manually. How to Combine a Filename with a Directory in C# ? Below is a sample code snippet demonstrating how to use Path.Combine method in C#.
How to Check if the ArrayList is read-only in C# ?
There are times when you would use the read-only wrapper in order to prevent modifying the ArrayList. We use the ArrayList.ReadOnly method to create such collection. When doing so , you might want to check if the ArrayList is Read-only or not. How to Check if the ArrayList is read-only in C# ? Use the IsReadOnly property defined in the ArrayList object to check this.
C# Compiler Warning – CS0419 ambiguous reference in cref attribute: ‘
In this blog post, you’ll learn more about the C# Compiler Warning – CS0419 and the related message description C# Compiler Warning Code CS0419 C# Compiler Description for the Code :CS0419 Ambiguous reference in cref attribute: ‘{0}’. Assuming ‘{1}’, but could have also matched other overloads including ‘{2}’.
C# Compiler Warning – CS3019 cls compliance checking will not be perf
In this blog post, you’ll learn more about the C# Compiler Warning – CS3019 and the related message description C# Compiler Warning Code CS3019 C# Compiler Description for the Code :CS3019 CLS compliance checking will not be performed on ‘{0}’ because it is not visible from outside this assembly
C# Compiler Error – CS8896 ‘unmanagedcallersonly’ can only be appli
In this blog post, you’ll learn more about the C# Compiler Error – CS8896 and the related message description C# Compiler Error Code CS8896 C# Compiler Description for the Code :CS8896 ‘UnmanagedCallersOnly’ can only be applied to ordinary static non-abstract methods or static local functions.
C# Compiler Warning – CS2002 source file ‘{0}’ specified multiple tim
In this blog post, you’ll learn more about the C# Compiler Warning – CS2002 and the related message description C# Compiler Warning Code CS2002 C# Compiler Description for the Code :CS2002 Source file ‘{0}’ specified multiple times
C# Compiler Warning – CS8644 ‘{0}’ does not implement interface membe
In this blog post, you’ll learn more about the C# Compiler Warning – CS8644 and the related message description C# Compiler Warning Code CS8644 C# Compiler Description for the Code :CS8644 ‘{0}’ does not implement interface member ‘{1}’. Nullability of reference types in interface implemented by the base type doesn’t match.
C# Compiler Error – CS0577 the conditional attribute is not valid o
In this blog post, you’ll learn more about the C# Compiler Error – CS0577 and the related message description C# Compiler Error Code CS0577 C# Compiler Description for the Code :CS0577 The Conditional attribute is not valid on ‘{0}’ because it is a constructor, destructor, operator, lambda expression, or explicit interface implementation
How to Pass Method or Function as Parameter in C# ?
The C# 3.0 and higher version provides the option for the user to specify the function or method as parameter using the Func delegate . How to Pass Method or Function as Parameter in C# ? Below is a sample code snippet demonstrating how to pass method as parameter in C# using Func delegate.