Category: C#
C# Compiler Error – CS1655 cannot use fields of ‘{0}’ as a ref or o
In this blog post, you’ll learn more about the C# Compiler Error – CS1655 and the related message description C# Compiler Error Code CS1655 C# Compiler Description for the Code :CS1655 Cannot use fields of ‘{0}’ as a ref or out value because it is a ‘{1}’
Grammars available for Speech Apps in Windows Phone SDK
When implementing the speech recognition in the windows phone apps, we should use the predefined grammars to identify if the input is valid or not. There are generally 3 different types of grammars that can be used when implementing speech feature in your Windows Phone app. Grammars available for Speech Apps in Windows Phone SDK Built-In grammars – There are 2 types of built in…
How to disable editing of items in a combo box in c#?
When working in Win forms using C# and especially when you use the combo box , you would have noticed that by default the user can edit the values inside during the runtime. How to disable editing of items in a combo box in c# (win forms) ? Assuming that the combobox name is combobox1 , here the code to get this behavior.
C# Compiler Error – CS0644 ‘{0}’ cannot derive from special class ‘
In this blog post, you’ll learn more about the C# Compiler Error – CS0644 and the related message description C# Compiler Error Code CS0644 C# Compiler Description for the Code :CS0644 ‘{0}’ cannot derive from special class ‘{1}’
C# Compiler Error – CS1104 a parameter array cannot be used with ‘t
In this blog post, you’ll learn more about the C# Compiler Error – CS1104 and the related message description C# Compiler Error Code CS1104 C# Compiler Description for the Code :CS1104 A parameter array cannot be used with ‘this’ modifier on an extension method
C# Compiler Warning – CS8597 thrown value may be null.
In this blog post, you’ll learn more about the C# Compiler Warning – CS8597 and the related message description C# Compiler Warning Code CS8597 C# Compiler Description for the Code :CS8597 Thrown value may be null.
How to Check if the Enum Value is Defined in C# ?
There are times when it is necessary to check if the constant name or numeric value is defined in the Enum . We can use the Enum.IsDefined method to verify this. How to Check if the Enum Value is Defined in C# ? Below is a sample code to demonstrate how to Check if the Enum Value is Defined in C# using Enum.IsDefined method. The…
C# Compiler Error – CS0547 ‘{0}’: property or indexer cannot have v
In this blog post, you’ll learn more about the C# Compiler Error – CS0547 and the related message description C# Compiler Error Code CS0547 C# Compiler Description for the Code :CS0547 ‘{0}’: property or indexer cannot have void type
C# Compiler Error – CS8134 deconstruction must contain at least two
In this blog post, you’ll learn more about the C# Compiler Error – CS8134 and the related message description C# Compiler Error Code CS8134 C# Compiler Description for the Code :CS8134 Deconstruction must contain at least two variables.
C# Compiler Error – CS8790 an expression tree may not contain a pat
In this blog post, you’ll learn more about the C# Compiler Error – CS8790 and the related message description C# Compiler Error Code CS8790 C# Compiler Description for the Code :CS8790 An expression tree may not contain a pattern System.Index or System.Range indexer access
C# Compiler Error – CS8102 public signing was specified and require
In this blog post, you’ll learn more about the C# Compiler Error – CS8102 and the related message description C# Compiler Error Code CS8102 C# Compiler Description for the Code :CS8102 Public signing was specified and requires a public key, but no public key was specified.
C# Compiler Error – CS0819 implicitly-typed variables cannot have m
In this blog post, you’ll learn more about the C# Compiler Error – CS0819 and the related message description C# Compiler Error Code CS0819 C# Compiler Description for the Code :CS0819 Implicitly-typed variables cannot have multiple declarators
How to Save File to Isolated Storage in Windows Phone 8?
There are times when you want to copy the files to isolated storage in your Windows Phone 8 App which you can do it easily using C#. Below is a sample code snippet that demonstrates the copying of file to isolated storage in Windows Phone 8 using C#? How to Save File to Isolated Storage in Windows Phone 8? Calling the function Note: make sure…
C# Compiler Error – CS0058 inconsistent accessibility: return type
In this blog post, you’ll learn more about the C# Compiler Error – CS0058 and the related message description C# Compiler Error Code CS0058 C# Compiler Description for the Code :CS0058 Inconsistent accessibility: return type ‘{1}’ is less accessible than delegate ‘{0}’
C# and LINQ – Filter elements from object collection with Logical Operators
Here’s a sample code snippet demonstrating how to filter elements from a list of objects using the where clause using LINQ in C#. This sample gets all the employees who salary is greater than 20000 GBP and age is greater than 22. How to Filter Employees List whose salary is greater than 20000 GBP and age is greater than 22 using LINQ in C# ?…
How to Extract number from a string using C# ?
Regular expression lets you to do some of the tasks quickly in C# and now such of the task that can be done using the Regex class is to extract number from a string using C# .
C# Compiler Error – CS8779 ‘{0}’ is already listed in the interface
In this blog post, you’ll learn more about the C# Compiler Error – CS8779 and the related message description C# Compiler Error Code CS8779 C# Compiler Description for the Code :CS8779 ‘{0}’ is already listed in the interface list on type ‘{2}’ as ‘{1}’.
C# Compiler Error – CS0448 the return type for ++ or — operator mus
In this blog post, you’ll learn more about the C# Compiler Error – CS0448 and the related message description C# Compiler Error Code CS0448 C# Compiler Description for the Code :CS0448 The return type for ++ or — operator must match the parameter type or be derived from the parameter type
C# Compiler Error – CS8087 a ‘{0}’ character may only be escaped by
In this blog post, you’ll learn more about the C# Compiler Error – CS8087 and the related message description C# Compiler Error Code CS8087 C# Compiler Description for the Code :CS8087 A ‘{0}’ character may only be escaped by doubling ‘{0}{0}’ in an interpolated string.
C# Compiler Error – CS0514 ‘{0}’: static constructor cannot have an
In this blog post, you’ll learn more about the C# Compiler Error – CS0514 and the related message description C# Compiler Error Code CS0514 C# Compiler Description for the Code :CS0514 ‘{0}’: static constructor cannot have an explicit ‘this’ or ‘base’ constructor call