Category: C#

Using Null Coalescing Operator in C#

Sometimes , you may want to simply the Null checks in your .NET Program without much usage of the if statements . The Null Coalescing Operator can be used in this scenario. Using Null Coalescing Operator in C#

C# Compiler Error – CS1959 ‘{0}’ is of type ‘{1}’. the type specifi

In this blog post, you’ll learn more about the C# Compiler Error – CS1959 and the related message description C# Compiler Error Code CS1959 C# Compiler Description for the Code :CS1959 ‘{0}’ is of type ‘{1}’. The type specified in a constant declaration must be sbyte, byte, short, ushort, int, uint, long, ulong, char, float, double, decimal, bool, string, an enum-type, or a reference-type.

Implicit Type Inference in C#

There are times when you want to declare a variable and assign a value to it even without having to figure out what the data type of the variable is . In C# , the var keyword provides the type inference feature where the compiler decides what type the local variable is . Below is a sample code snippet demonstrating the Implicit Type Inference in…

C# Compiler Error – CS0136 a local or parameter named ‘{0}’ cannot

In this blog post, you’ll learn more about the C# Compiler Error – CS0136 and the related message description C# Compiler Error Code CS0136 C# Compiler Description for the Code :CS0136 A local or parameter named ‘{0}’ cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter

How to Get a developer license to develop Windows Phone store app ?

When you installed the Windows Phone 8.1 SDK and try to create and run the first Windows Phone application . You will be prompted to get a free developer license which is necessary to develop and test the windows phone store app on the Windows 8.1 PC before publishing and getting it certified in the store . How to Get a developer license to develop…

C# Compiler Error – CS8798 partial method ‘{0}’ must have accessibi

In this blog post, you’ll learn more about the C# Compiler Error – CS8798 and the related message description C# Compiler Error Code CS8798 C# Compiler Description for the Code :CS8798 Partial method ‘{0}’ must have accessibility modifiers because it has a ‘virtual’, ‘override’, ‘sealed’, ‘new’, or ‘extern’ modifier.