Category: C#

C# Compiler Error – CS1640 foreach statement cannot operate on vari

In this blog post, you’ll learn more about the C# Compiler Error – CS1640 and the related message description C# Compiler Error Code CS1640 C# Compiler Description for the Code :CS1640 foreach statement cannot operate on variables of type ‘{0}’ because it implements multiple instantiations of ‘{1}’; try casting to a specific interface instantiation

Initialize int array in C# ?

Here’s a code snippet demonstrating how to initialize int arrays in C# and display the contents of it using the for loop. How to Initialize int array in C# ?

XAP File in Windows Phone

XAP is the file which is used to deploy the app to the unlocked windows phone 8 device or submit the app for windows phone store. In simple terms, XAP is the output of the Windows Phone 8 project in Visual Studio and is a compressed files which contains assemblies, images, configuration files etc. The XAP file also contains 2 more important application manifest file…

C# Compiler Error – CS8707 target runtime doesn’t support ‘protecte

In this blog post, you’ll learn more about the C# Compiler Error – CS8707 and the related message description C# Compiler Error Code CS8707 C# Compiler Description for the Code :CS8707 Target runtime doesn’t support ‘protected’, ‘protected internal’, or ‘private protected’ accessibility for a member of an interface.

Lock keyword in C#

Want to get the mutual exclusion lock for a given object or a block of statement? If yes, you can use the lock keyword in C# which marks the start of the critical section. The lock keyword may be useful especially when you are using threading in your application. It ensures that only one thread can enter and use the critical section. If another thread…

How to use Named Parameters in C# ?

Named Parameters is one of the cool features in C# 4.0 that lets you to call the methods with the parameters with their names . How to use Named Parameters in C# ? Below is a sample code snippet demonstrating the usage of the Named Parameters in C#.