Category: C#

How to Rethrow an Exception in C# ?

There are times when you want to handle the exception and then pass it to the higher level . Below is a sample code snippet demonstrating how to Rethrow an exception in C# . How to Rethrow an Exception in C# ?

Alternate Way of getting the Unique DeviceId in Windows Phone 8

The Windows Phone 8 SDK provides the PublisherHostId defined in the HostInformation class which can be used to get the Unique DeviceId in Windows Phone which is specific to the publisher. Alternate Way of getting the Unique DeviceId in Windows Phone 8 Below is a sample code snippet demonstrating how to get the Unique DeviceId in Windows Phone 8 using PublicherHostId. Note that the access…

C# Compiler Error – CS0311 the type ‘{3}’ cannot be used as type pa

In this blog post, you’ll learn more about the C# Compiler Error – CS0311 and the related message description C# Compiler Error Code CS0311 C# Compiler Description for the Code :CS0311 The type ‘{3}’ cannot be used as type parameter ‘{2}’ in the generic type or method ‘{0}’. There is no implicit reference conversion from ‘{3}’ to ‘{1}’.

C# Compiler Warning – CS7082 the callerfilepathattribute applied to p

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