Category: C#

C# Compiler Error – CS8411 asynchronous foreach statement cannot op

In this blog post, you’ll learn more about the C# Compiler Error – CS8411 and the related message description C# Compiler Error Code CS8411 C# Compiler Description for the Code :CS8411 Asynchronous foreach statement cannot operate on variables of type ‘{0}’ because ‘{0}’ does not contain a suitable public instance or extension definition for ‘{1}’

How to Launch the Application Details Page in Windows Phone Store using C#?

The Windows Phone 8 SDK provides the MarketplaceDetailTask which lets the users to launch the specified application’s details page in the Windows Phone Store from the Windows Phone App. How to Launch the Application Details Page in Windows Phone Store using C#? Below is a sample code snippet that demonstrates how to use the MarketplaceDetailTask. Modify the Content Identifier to specify the app for which…

Pass by Reference using ref keyword

You can use the keyword ref in csharp to pass a value by reference instead of call by value . using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Namespace1 { class Student { public string StudentName { get; set; } /* usage of the pass by reference using the keyword ref */ public void Add(ref int i) { i = i +…

How to check the Equality of Anonymous Types in C#?

The Equals method is used to check the equality. The anonymous types will be equal of it has the same order, type, name and values. How to check the Equality of Anonymous Types in C#? Below is a sample sourcecode demonstrating how to check the Equality of Anonymous types in c#.