Category: C#

C# Compiler Error – CS8822 method ‘{0}’ specifies a ‘default’ const

In this blog post, you’ll learn more about the C# Compiler Error – CS8822 and the related message description C# Compiler Error Code CS8822 C# Compiler Description for the Code :CS8822 Method ‘{0}’ specifies a ‘default’ constraint for type parameter ‘{1}’, but corresponding type parameter ‘{2}’ of overridden or explicitly implemented method ‘{3}’ is constrained to a reference type or a value type.

Visual Assets Tab in Package Manifest file

The Visual Assets tab in the package manifest file lets the developers set the characteristics of the application’s title , splash screen and the images used within the application for various scenario. You will be able to specify the splash screen for your Windows Phone and Windows Store separately because the dimensions are different for phone and the tablet app. The Splash screen for the…

C# Compiler Error – CS1971 the call to method ‘{0}’ needs to be dyn

In this blog post, you’ll learn more about the C# Compiler Error – CS1971 and the related message description C# Compiler Error Code CS1971 C# Compiler Description for the Code :CS1971 The call to method ‘{0}’ needs to be dynamically dispatched, but cannot be because it is part of a base access expression. Consider casting the dynamic arguments or eliminating the base access.

Initialize Read-only Properties from Constructor in C# 6.0

C# 6.0 lets the developers to initialize the read only properties directly when declaring them . Since it is a read-only property , it behaves the same as read only variable where you can initialize the read-only auto properties from a constructor. Initialize Read-only Properties from Constructor in C# 6.0 Below is a sample code snippet demonstrating how to initialize read-only properties from constructor in…