Category: C#
C# Compiler Error – CS8160 a readonly field cannot be returned by w
In this blog post, you’ll learn more about the C# Compiler Error – CS8160 and the related message description C# Compiler Error Code CS8160 C# Compiler Description for the Code :CS8160 A readonly field cannot be returned by writable reference
C# Compiler Error – CS0683 ‘{0}’ explicit method implementation can
In this blog post, you’ll learn more about the C# Compiler Error – CS0683 and the related message description C# Compiler Error Code CS0683 C# Compiler Description for the Code :CS0683 ‘{0}’ explicit method implementation cannot implement ‘{1}’ because it is an accessor
C# Compiler Warning – CS7090 attribute ‘{0}’ from module ‘{1}’ will b
In this blog post, you’ll learn more about the C# Compiler Warning – CS7090 and the related message description C# Compiler Warning Code CS7090 C# Compiler Description for the Code :CS7090 Attribute ‘{0}’ from module ‘{1}’ will be ignored in favor of the instance appearing in source
C# Compiler Error – CS0272 the property or indexer ‘{0}’ cannot be
In this blog post, you’ll learn more about the C# Compiler Error – CS0272 and the related message description C# Compiler Error Code CS0272 C# Compiler Description for the Code :CS0272 The property or indexer ‘{0}’ cannot be used in this context because the set accessor is inaccessible
C# Compiler Error – CS8806 the calling convention of ‘{0}’ is not s
In this blog post, you’ll learn more about the C# Compiler Error – CS8806 and the related message description C# Compiler Error Code CS8806 C# Compiler Description for the Code :CS8806 The calling convention of ‘{0}’ is not supported by the language.
C# Compiler Warning – CS1998 this async method lacks ‘await’ operator
In this blog post, you’ll learn more about the C# Compiler Warning – CS1998 and the related message description C# Compiler Warning Code CS1998 C# Compiler Description for the Code :CS1998 This async method lacks ‘await’ operators and will run synchronously. Consider using the ‘await’ operator to await non-blocking API calls, or ‘await Task.Run(…)’ to do CPU-bound work on a background thread.
C# Compiler Error – CS8871 ‘{0}’ does not override expected method
In this blog post, you’ll learn more about the C# Compiler Error – CS8871 and the related message description C# Compiler Error Code CS8871 C# Compiler Description for the Code :CS8871 ‘{0}’ does not override expected method from ‘{1}’.
How to read a connection string from web.config file in ASP.NET ?
Assume that you have a connectionstring configured in the web.config file of your ASP.NET application and you wish to read it using C# within your application. How to read a connection string from web.config file in ASP.NET ? You can easily do that using the ConfigurationManager class defined in the System.Configuration namespace. 1. Ensure that the System.Configuration assembly is referenced in your project. 2. Add…
C# Compiler Error – CS0751 a partial method must be declared within
In this blog post, you’ll learn more about the C# Compiler Error – CS0751 and the related message description C# Compiler Error Code CS0751 C# Compiler Description for the Code :CS0751 A partial method must be declared within a partial type
Using TryParse to parse string to integer in C#
You can use the int.TryParse to parse a string in to numbers . The function returns true if it suceeds in parsing the string to integer and false if it doesn’t.
Demonstrate Character Arrays in C#
Below is a sample sourcecode demonstrating Character Arrays in C#
C# Compiler Warning – CS1574 xml comment has cref attribute ‘{0}’ tha
In this blog post, you’ll learn more about the C# Compiler Warning – CS1574 and the related message description C# Compiler Warning Code CS1574 C# Compiler Description for the Code :CS1574 XML comment has cref attribute ‘{0}’ that could not be resolved
C# Compiler Error – CS1537 the using alias ‘{0}’ appeared previousl
In this blog post, you’ll learn more about the C# Compiler Error – CS1537 and the related message description C# Compiler Error Code CS1537 C# Compiler Description for the Code :CS1537 The using alias ‘{0}’ appeared previously in this namespace
How to download a file from a URL using C#?
You can use the WebClient class in C# to download a file. How to download a file from a URL using C#? Here’s a code snippet demonstrating how you can download a file using the instance of the WebClient class in C#.
How to Use LINQ query on a DataTable in C#?
Below is a sample code snippet that demonstrates the usage of the LINQ query on a DataTable in C#. How to Use LINQ query on a DataTable in C#?
C# Compiler Error – CS0470 method ‘{0}’ cannot implement interface
In this blog post, you’ll learn more about the C# Compiler Error – CS0470 and the related message description C# Compiler Error Code CS0470 C# Compiler Description for the Code :CS0470 Method ‘{0}’ cannot implement interface accessor ‘{1}’ for type ‘{2}’. Use an explicit interface implementation.
C# Compiler Error – CS4011 ‘await’ requires that the return type ‘{
In this blog post, you’ll learn more about the C# Compiler Error – CS4011 and the related message description C# Compiler Error Code CS4011 C# Compiler Description for the Code :CS4011 ‘await’ requires that the return type ‘{0}’ of ‘{1}.GetAwaiter()’ have suitable ‘IsCompleted’, ‘OnCompleted’, and ‘GetResult’ members, and implement ‘INotifyCompletion’ or ‘ICriticalNotifyCompletion’
C# Compiler Error – CS4012 parameters or locals of type ‘{0}’ canno
In this blog post, you’ll learn more about the C# Compiler Error – CS4012 and the related message description C# Compiler Error Code CS4012 C# Compiler Description for the Code :CS4012 Parameters or locals of type ‘{0}’ cannot be declared in async methods or async lambda expressions.
C# Compiler Warning – CS8669 the annotation for nullable reference ty
In this blog post, you’ll learn more about the C# Compiler Warning – CS8669 and the related message description C# Compiler Warning Code CS8669 C# Compiler Description for the Code :CS8669 The annotation for nullable reference types should only be used in code within a ‘#nullable’ annotations context. Auto-generated code requires an explicit ‘#nullable’ directive in source.
Convert or cast integer to character in C#
Below is a sample sourecode demonstrating how to convert or cast int to char in C# Convert or cast integer to character in C#