Category: C#

Difference between Hash table and Dictionary in .NET

Here’s a simple difference between Hashtable and Dictionary in .NET Dictionary Hashtable It is generic in nature It is non generic in nature It is defined in the namespace System.Collections.Generic It is defined in the namespace System.Collections When a request is made to the dictionary and if the key does not exists , you get an exception When a request is made to the Hashtable…

How to update the value in a Dictionary in C# ?

Below is a sample code snippet demonstrating how to update the value that is stored within the dictionary using C#. We access the dictionary with the key as index and set the value. How to update the value in a Dictionary in C# ?

C# Compiler Error – CS0217 in order to be applicable as a short cir

In this blog post, you’ll learn more about the C# Compiler Error – CS0217 and the related message description C# Compiler Error Code CS0217 C# Compiler Description for the Code :CS0217 In order to be applicable as a short circuit operator a user-defined logical operator (‘{0}’) must have the same return type and parameter types

What is the Difference between Readonly and Const in C# ?

If you want to have a field whose value cannot be changed at runtime , you can use either const or readonly keyword . What is the Difference between ReadOnly and Const in C# ? The constant fields must be defined when declaring and cannot be changed at runtime . It is a implicitly static . The read only field can be set when declaring…

C# Compiler Warning – CS7080 the callermembernameattribute applied to

In this blog post, you’ll learn more about the C# Compiler Warning – CS7080 and the related message description C# Compiler Warning Code CS7080 C# Compiler Description for the Code :CS7080 The CallerMemberNameAttribute applied to parameter ‘{0}’ will have no effect. It is overridden by the CallerFilePathAttribute.

Different Operators in C#

Below is a list of some of the operators in C# Arithmetic Operators + , – , * , / , % Logical Operators & , | , ^ , ~ , && , || , ! Increment and Decrement Operators ++ , — Bit Shift Operators << , >> Comparison Operators == , != , <> , <= , >= Assignment Operator = ,…

Can Windows Phone 8 SDK be installed on 32 bit Windows 8 system?

This is one of the most frequently asked question by most of the developers. Can I install Windows Phone 8 SDK on 32 bit Windows 8 machine? The simple answer is no. The Windows Phone 8 SDK is supported on Windows 8 64 bit (x64) client versions. Know more about the Windows Phone 8 SDK prerequisites here