Category: C#
C# Compiler Error – CS0541 ‘{0}’: explicit interface declaration ca
In this blog post, you’ll learn more about the C# Compiler Error – CS0541 and the related message description C# Compiler Error Code CS0541 C# Compiler Description for the Code :CS0541 ‘{0}’: explicit interface declaration can only be declared in a class, record, struct or interface
How to Use Split Function in VB.NET?
The Split function in VB.NET (Visual Basic.NET) lets the developers to split the string based on the delimiter and return one – dimensional array that contains the substring. How to Use Split Function in VB.NET? Below is a sample code snippet that demonstrates how to use the Split function in VB.NET. Output of Split Function
C# Compiler Error – CS0515 ‘{0}’: access modifiers are not allowed
In this blog post, you’ll learn more about the C# Compiler Error – CS0515 and the related message description C# Compiler Error Code CS0515 C# Compiler Description for the Code :CS0515 ‘{0}’: access modifiers are not allowed on static constructors
How to Convert a string in JSON.NET to XML in C# ?
You can use the JsonConvert.DeserializeXmlNode method of JSON.NET to convert from the json string to Xmldocument as shown below. How to Convert a string in JSON.NET to XML in C# ?
C# Compiler Error – CS0118 ‘{0}’ is a {1} but is used like a {2}
In this blog post, you’ll learn more about the C# Compiler Error – CS0118 and the related message description C# Compiler Error Code CS0118 C# Compiler Description for the Code :CS0118 ‘{0}’ is a {1} but is used like a {2}
C# Compiler Warning – CS8425 async-iterator ‘{0}’ has one or more par
In this blog post, you’ll learn more about the C# Compiler Warning – CS8425 and the related message description C# Compiler Warning Code CS8425 C# Compiler Description for the Code :CS8425 Async-iterator ‘{0}’ has one or more parameters of type ‘CancellationToken’ but none of them is decorated with the ‘EnumeratorCancellation’ attribute, so the cancellation token parameter from the generated ‘IAsyncEnumerable.GetAsyncEnumerator’ will be unconsumed
C# Compiler Error – CS1526 a new expression requires an argument li
In this blog post, you’ll learn more about the C# Compiler Error – CS1526 and the related message description C# Compiler Error Code CS1526 C# Compiler Description for the Code :CS1526 A new expression requires an argument list or (), [], or {} after type
@ Operator in C#
Although it is not the best practise , If you want use the reserve words and the variable name , you could use the @ prefixed before the variable name . Below is a sample sourcecode that demonstrates the use of @ symbol. static void Main() { int @if = 10; MessageBox.Show(@if.ToString()); }
C# Compiler Error – CS0226 an __arglist expression may only appear
In this blog post, you’ll learn more about the C# Compiler Error – CS0226 and the related message description C# Compiler Error Code CS0226 C# Compiler Description for the Code :CS0226 An __arglist expression may only appear inside of a call or new expression
How to Print Leading Zeroes for a Number in C# ?
The Leading Zeroes for a number can be printed using the format string “D” in .NET . Below is a sample code snippet that demonstrates printing of 3 leading zeroes for a number 5 digit number in C#. How to Print Leading Zeroes for a Number in C# ?
C# Compiler Error – CS1931 the range variable ‘{0}’ conflicts with
In this blog post, you’ll learn more about the C# Compiler Error – CS1931 and the related message description C# Compiler Error Code CS1931 C# Compiler Description for the Code :CS1931 The range variable ‘{0}’ conflicts with a previous declaration of ‘{0}’
C# Compiler Warning – CS3012 you must specify the clscompliant attrib
In this blog post, you’ll learn more about the C# Compiler Warning – CS3012 and the related message description C# Compiler Warning Code CS3012 C# Compiler Description for the Code :CS3012 You must specify the CLSCompliant attribute on the assembly, not the module, to enable CLS compliance checking
C# Compiler Error – CS0698 a generic type cannot derive from ‘{0}’
In this blog post, you’ll learn more about the C# Compiler Error – CS0698 and the related message description C# Compiler Error Code CS0698 C# Compiler Description for the Code :CS0698 A generic type cannot derive from ‘{0}’ because it is an attribute class
Can i run Windows Phone 8.1 App on Windows Phone 8 device ?
If you are a developer who is developing Windows Phone 8.1 apps for the first time or if you are a beginner then you might have this question. Can i run Windows Phone 8.1 Project on Windows Phone 8 device ? If you develop a app targeting Windows Phone 8.0 , then this will run on Windows Phone 8.1 device but if you are developing…
C# Compiler Error – CS0211 cannot take the address of the given exp
In this blog post, you’ll learn more about the C# Compiler Error – CS0211 and the related message description C# Compiler Error Code CS0211 C# Compiler Description for the Code :CS0211 Cannot take the address of the given expression
C# Compiler Fatal – CS2033 cannot create short filename ‘{0}’ when
In this blog post, you’ll learn more about the C# Compiler Fatal – CS2033 and the related message description C# Compiler Fatal Code CS2033 C# Compiler Description for the Code :CS2033 Cannot create short filename ‘{0}’ when a long filename with the same short filename already exists
C# Compiler Error – CS0281 friend access was granted by ‘{0}’, but
In this blog post, you’ll learn more about the C# Compiler Error – CS0281 and the related message description C# Compiler Error Code CS0281 C# Compiler Description for the Code :CS0281 Friend access was granted by ‘{0}’, but the public key of the output assembly (‘{1}’) does not match that specified by the InternalsVisibleTo attribute in the granting assembly.
Auto-Property Initializers for Read-Only Properties in C# 6.0
In the earlier version of C# , if you want a read-only property , you would end up having a backing field which is initialized in the constructor. In C# 6.0 , the auto-implemented properties can be used to implement read-only property using the auto-property initializer as shown below. Auto-Property Initializers for Read-Only Properties in C# 6.0
C# Compiler Error – CS0757 a partial method may not have multiple i
In this blog post, you’ll learn more about the C# Compiler Error – CS0757 and the related message description C# Compiler Error Code CS0757 C# Compiler Description for the Code :CS0757 A partial method may not have multiple implementing declarations
C# Compiler Error – CS1597 semicolon after method or accessor block
In this blog post, you’ll learn more about the C# Compiler Error – CS1597 and the related message description C# Compiler Error Code CS1597 C# Compiler Description for the Code :CS1597 Semicolon after method or accessor block is not valid