Category: C#
C# Compiler Error – CS8823 the ‘default’ constraint is valid on ove
In this blog post, you’ll learn more about the C# Compiler Error – CS8823 and the related message description C# Compiler Error Code CS8823 C# Compiler Description for the Code :CS8823 The ‘default’ constraint is valid on override and explicit interface implementation methods only.
C# Compiler Warning – CS1720 expression will always cause a system.nu
In this blog post, you’ll learn more about the C# Compiler Warning – CS1720 and the related message description C# Compiler Warning Code CS1720 C# Compiler Description for the Code :CS1720 Expression will always cause a System.NullReferenceException because the default value of ‘{0}’ is null
C# Compiler Error – CS8355 an in parameter cannot have the out attr
In this blog post, you’ll learn more about the C# Compiler Error – CS8355 and the related message description C# Compiler Error Code CS8355 C# Compiler Description for the Code :CS8355 An in parameter cannot have the Out attribute.
C# Compiler Error – CS8813 a module initializer must be an ordinary
In this blog post, you’ll learn more about the C# Compiler Error – CS8813 and the related message description C# Compiler Error Code CS8813 C# Compiler Description for the Code :CS8813 A module initializer must be an ordinary member method
C# Compiler Error – CS0081 type parameter declaration must be an id
In this blog post, you’ll learn more about the C# Compiler Error – CS0081 and the related message description C# Compiler Error Code CS0081 C# Compiler Description for the Code :CS0081 Type parameter declaration must be an identifier not a type
Lambdas Expression for Getter-Only Auto-Properties in C# 6.0
C# 6.0 lets the developers use the lambda expression to implement the getter value of the read-only property . Whenever a lambda expression is found , the C# compiler identifies it as the property with only get method rather than a field. Lambdas Expression for Getter-Only Auto-Properties in C# 6.0 Below is a sample code snippet demonstrating the use of Lambdas Expression for Getter-Only Auto-Properties…
C# Compiler Warning – CS8371 field-targeted attributes on auto-proper
In this blog post, you’ll learn more about the C# Compiler Warning – CS8371 and the related message description C# Compiler Warning Code CS8371 C# Compiler Description for the Code :CS8371 Field-targeted attributes on auto-properties are not supported in language version {0}. Please use language version {1} or greater.
How to Notify Clients when there is a change using C# ?
There are times when you want the users who use the class wants some kind of indication or notification when there is a change in data inside it . One of the solutions for this is to make the class implement INotifyPropertyChanged interface which is located in the namespace System.ComponentModel. One of the primary use of the INotifyPropertyChanged is in the WPF / Silverlight /…
C# Compiler Error – CS8169 cannot return a member of local ‘{0}’ by
In this blog post, you’ll learn more about the C# Compiler Error – CS8169 and the related message description C# Compiler Error Code CS8169 C# Compiler Description for the Code :CS8169 Cannot return a member of local ‘{0}’ by reference because it is not a ref local
C# Compiler Warning – CS8609 nullability of reference types in return
In this blog post, you’ll learn more about the C# Compiler Warning – CS8609 and the related message description C# Compiler Warning Code CS8609 C# Compiler Description for the Code :CS8609 Nullability of reference types in return type doesn’t match overridden member.
C# Compiler Error – CS8361 a conditional expression cannot be used
In this blog post, you’ll learn more about the C# Compiler Error – CS8361 and the related message description C# Compiler Error Code CS8361 C# Compiler Description for the Code :CS8361 A conditional expression cannot be used directly in a string interpolation because the ‘:’ ends the interpolation. Parenthesize the conditional expression.
How to Catch an Exception in C# ?
Every time when the exception is thrown , it is necessary that it be handled . In this case , one needs to wrap the code with the try catch block as shown below. How to Catch an Exception in C# ?
C# Compiler Error – CS0549 ‘{0}’ is a new virtual member in sealed
In this blog post, you’ll learn more about the C# Compiler Error – CS0549 and the related message description C# Compiler Error Code CS0549 C# Compiler Description for the Code :CS0549 ‘{0}’ is a new virtual member in sealed type ‘{1}’
C# Compiler Error – CS8345 field or auto-implemented property canno
In this blog post, you’ll learn more about the C# Compiler Error – CS8345 and the related message description C# Compiler Error Code CS8345 C# Compiler Description for the Code :CS8345 Field or auto-implemented property cannot be of type ‘{0}’ unless it is an instance member of a ref struct.
Will the Windows Phone 7 App run on Windows Phone 8 Devices?
This is one of the most frequently asked question by any newbie windows phone developer. Will the developed Windows Phone 7 App run on Windows Phone 8 Devices? The answer to this pretty simple and straight forward. Yes, in most cases, the Windows Phone 7 app will run fine on Windows Phone 8 devices. But the only drawback here is that the apps targeting the…
C# Compiler Error – CS1624 the body of ‘{0}’ cannot be an iterator
In this blog post, you’ll learn more about the C# Compiler Error – CS1624 and the related message description C# Compiler Error Code CS1624 C# Compiler Description for the Code :CS1624 The body of ‘{0}’ cannot be an iterator block because ‘{1}’ is not an iterator interface type
C# Compiler Error – CS8203 invalid assembly name: {0}
In this blog post, you’ll learn more about the C# Compiler Error – CS8203 and the related message description C# Compiler Error Code CS8203 C# Compiler Description for the Code :CS8203 Invalid assembly name: {0}
How to Convert Integer to Hex and Vice versa in C# ?
If you want to convert an integer value to a hexa decimal value in C# and hexa decimal value to integer , you can use the “X” string formatting specifiers and the int.parse method with the method over loading option. How to Convert Integer to Hex and Vice versa in C# ? The code snippet to demonstrate the conversion of the integer value to hexa…
C# Compiler Error – CS0681 the modifier ‘abstract’ is not valid on
In this blog post, you’ll learn more about the C# Compiler Error – CS0681 and the related message description C# Compiler Error Code CS0681 C# Compiler Description for the Code :CS0681 The modifier ‘abstract’ is not valid on fields. Try using a property instead.
How to Validate an email address using Regular Expression in C# ?
You can validate an email address in C# using regular expressions which provides the developers to play around with different patterns. Below is a code snippet that shows how you can use regular expression to validate an email address in C# . How to Validate an email address using Regular Expression in C# ?