Category: C#

Defining URLs in the UWP hosted Web apps

When developing the UWP hosted Web Apps for Windows 10 , you can define the URLs that your hosted web app can include and exclude . Defining URLs in the UWP hosted Web apps You generally define this in the app package manifest file by setting the Application Content URI Rules (ACURs) as shown below.

C# Compiler Warning – CS1981 using ‘{0}’ to test compatibility with ‘

In this blog post, you’ll learn more about the C# Compiler Warning – CS1981 and the related message description C# Compiler Warning Code CS1981 C# Compiler Description for the Code :CS1981 Using ‘{0}’ to test compatibility with ‘{1}’ is essentially identical to testing compatibility with ‘{2}’ and will succeed for all non-null values

What are the Different Resolutions that Windows Phone 8 Supports ?

The Windows Phone 8 supports 3 different resolutions which includes WVGA with 480 X 800 pixels and scale factor of 1.0. WXGA with 768 X 1280 pixels and scale factor of 1.6. HD720P with 720 X 1280 pixels and scale factor of 1.5. The WVGA with 480 X 800 was already supported in Windows Phone 7.8 and earlier version and the other 2 resolutions are…

Json.NET & C# – How to Seralize an Object ?

One of the ways to serialize an object to JSON string in C# in the Json.NET is using the SerializeObject method defined in the JsonConvert method. The JsonConvert class provides an easy to use wrapper class and method over the JsonSerializer. How to Seralize an Object in C# using Json.NET ? Below is the sample code snippet demonstrating the usage of JsonConvert.SerializeObject method in C#…

Example of Anonymous methods in C#

Anonymous methods in C# are like regular methods nut does not contain any name. Anonymous methods are just like regular methods  and uses the delegate keyword and does not need a name , parameter or return type. Example of Anonymous methods in C# Below is a sample code snippet demonstrating the usage of the anonymous types in C#