Category: C#

C# Compiler Error – CS8904 invalid variance: the type parameter ‘{1

In this blog post, you’ll learn more about the C# Compiler Error – CS8904 and the related message description C# Compiler Error Code CS8904 C# Compiler Description for the Code :CS8904 Invalid variance: The type parameter ‘{1}’ must be {3} valid on ‘{0}’ unless language version ‘{4}’ or greater is used. ‘{1}’ is {2}.

C# Compiler Error – CS7070 security attribute ‘{0}’ is not valid on

In this blog post, you’ll learn more about the C# Compiler Error – CS7070 and the related message description C# Compiler Error Code CS7070 C# Compiler Description for the Code :CS7070 Security attribute ‘{0}’ is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations.

C# Compiler Warning – CS8766 nullability of reference types in return

In this blog post, you’ll learn more about the C# Compiler Warning – CS8766 and the related message description C# Compiler Warning Code CS8766 C# Compiler Description for the Code :CS8766 Nullability of reference types in return type of ‘{0}’ doesn’t match implicitly implemented member ‘{1}’ (possibly because of nullability attributes).

C# Compiler Error – CS8420 the body of an async-iterator method mus

In this blog post, you’ll learn more about the C# Compiler Error – CS8420 and the related message description C# Compiler Error Code CS8420 C# Compiler Description for the Code :CS8420 The body of an async-iterator method must contain a ‘yield’ statement. Consider removing ‘async’ from the method declaration or adding a ‘yield’ statement.

How do Specify the Exit Code of Console Application in .NET?

There are times when you want to specify the exit code from the Main function for example when working on the Console Application in .NET . How do Specify the Exit Code of Console Application in .NET? You can use the Environment.Exit to specify the exit code in the Console Application.

System.Windows.Markup.XamlParseException when using MapControl in Windows Phone 8

When working with the MapControl in Windows Phone 8 , you might receive the following error when the right capabilities for the Map is not set in the Windows Phone Application Manifest file. System.Windows.Markup.XamlParseException when using MapControl in Windows Phone 8 To resolve this error , Open the WMAppmanifest.xml file and the check or enable the ID_CAP_MAP in the capabilities tab.