Category: C#
C# Compiler Error – CS1031 type expected
In this blog post, you’ll learn more about the C# Compiler Error – CS1031 and the related message description C# Compiler Error Code CS1031 C# Compiler Description for the Code :CS1031 Type expected
C# Compiler Error – CS0151 a switch expression or case label must b
In this blog post, you’ll learn more about the C# Compiler Error – CS0151 and the related message description C# Compiler Error Code CS0151 C# Compiler Description for the Code :CS0151 A switch expression or case label must be a bool, char, string, integral, enum, or corresponding nullable type in C# 6 and earlier.
C# Compiler Error – CS1985 cannot await in a catch clause
In this blog post, you’ll learn more about the C# Compiler Error – CS1985 and the related message description C# Compiler Error Code CS1985 C# Compiler Description for the Code :CS1985 Cannot await in a catch clause
C# Compiler Error – CS1986 ‘await’ requires that the type {0} have
In this blog post, you’ll learn more about the C# Compiler Error – CS1986 and the related message description C# Compiler Error Code CS1986 C# Compiler Description for the Code :CS1986 ‘await’ requires that the type {0} have a suitable ‘GetAwaiter’ method
C# Compiler Error – CS8830 ‘{0}’: target runtime doesn’t support co
In this blog post, you’ll learn more about the C# Compiler Error – CS8830 and the related message description C# Compiler Error Code CS8830 C# Compiler Description for the Code :CS8830 ‘{0}’: Target runtime doesn’t support covariant return types in overrides. Return type must be ‘{2}’ to match overridden member ‘{1}’
C# Compiler Error – CS0268 imported type ‘{0}’ is invalid. it conta
In this blog post, you’ll learn more about the C# Compiler Error – CS0268 and the related message description C# Compiler Error Code CS0268 C# Compiler Description for the Code :CS0268 Imported type ‘{0}’ is invalid. It contains a circular base type dependency.
C# Compiler Error – CS8859 members named ‘clone’ are disallowed in
In this blog post, you’ll learn more about the C# Compiler Error – CS8859 and the related message description C# Compiler Error Code CS8859 C# Compiler Description for the Code :CS8859 Members named ‘Clone’ are disallowed in records.
How to Open External Link using Hyperlink Control in Windows Phone 8?
The HyperLinkButton provides one of the easiest way to navigate to an external link without using the WebBrowserTask in Windows Phone 8. Below is a sample code snippet demonstrating how to use the HyperLinkControl to open external link in Windows Phone 8. How to Open External Link using HyperLinkControl in Windows Phone 8? Note that you need to specify the Target name to _blank for…
Displaying data in flat list in Windows Phone 8 LongListSelector Control
Below is a sample code snippet demonstrating the display of the flat list in the Windows Phone 8 LongListSelector Control. Displaying data in flat list in Windows Phone 8 LongListSelector Control LongListSelector Declaration <phone:LongListSelector Name=”lstWebsites” HorizontalAlignment=”Left” VerticalAlignment=”Top” LayoutMode=”List” IsGroupingEnabled=”False” Width=”446″> <phone:LongListSelector.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text=”{Binding Name}” /> </StackPanel> </DataTemplate> </phone:LongListSelector.ItemTemplate> </phone:LongListSelector> Model public class WebsiteName { public string Name { get; set; } public int…
How to remove the non ascii characters from a string in C# ?
Regular expression comes in handy especially if you want to remove the non ascii characters from a string in C#. Here’s a regular expression sample in C# demonstrating how to do it. How to remove the non ascii characters from a string in C# ? The output of the code snippet will be cde in C#
C# Compiler Error – CS7021 cannot declare namespace in script code
In this blog post, you’ll learn more about the C# Compiler Error – CS7021 and the related message description C# Compiler Error Code CS7021 C# Compiler Description for the Code :CS7021 Cannot declare namespace in script code
C# Compiler Error – CS8354 cannot return ‘this’ by reference.
In this blog post, you’ll learn more about the C# Compiler Error – CS8354 and the related message description C# Compiler Error Code CS8354 C# Compiler Description for the Code :CS8354 Cannot return ‘this’ by reference.
C# Compiler Error – CS1586 array creation must have array size or a
In this blog post, you’ll learn more about the C# Compiler Error – CS1586 and the related message description C# Compiler Error Code CS1586 C# Compiler Description for the Code :CS1586 Array creation must have array size or array initializer
C# Compiler Error – CS0198 a static readonly field cannot be assign
In this blog post, you’ll learn more about the C# Compiler Error – CS0198 and the related message description C# Compiler Error Code CS0198 C# Compiler Description for the Code :CS0198 A static readonly field cannot be assigned to (except in a static constructor or a variable initializer)
C# Compiler Warning – CS0219 the variable ‘{0}’ is assigned but its v
In this blog post, you’ll learn more about the C# Compiler Warning – CS0219 and the related message description C# Compiler Warning Code CS0219 C# Compiler Description for the Code :CS0219 The variable ‘{0}’ is assigned but its value is never used
C# Compiler Error – CS8752 the type ‘{0}’ may not be used as the ta
In this blog post, you’ll learn more about the C# Compiler Error – CS8752 and the related message description C# Compiler Error Code CS8752 C# Compiler Description for the Code :CS8752 The type ‘{0}’ may not be used as the target type of new()
C# Compiler Warning – CS3010 ‘{0}’: cls-compliant interfaces must hav
In this blog post, you’ll learn more about the C# Compiler Warning – CS3010 and the related message description C# Compiler Warning Code CS3010 C# Compiler Description for the Code :CS3010 ‘{0}’: CLS-compliant interfaces must have only CLS-compliant members
Programmatically Go Back to Previous Page in Windows Phone App
The developers can use the NavigationService.GoBack method to navigate to the previous page of the Windows Phone App. When using the NavigationService.GoBack , it is necessary to check if the Navigation can go back using the property NavigationService.CanGoBack as shown below. Programmatically Go Back to Previous Page in Windows Phone App
C# Compiler Error – CS0221 constant value ‘{0}’ cannot be converted
In this blog post, you’ll learn more about the C# Compiler Error – CS0221 and the related message description C# Compiler Error Code CS0221 C# Compiler Description for the Code :CS0221 Constant value ‘{0}’ cannot be converted to a ‘{1}’ (use ‘unchecked’ syntax to override)
C# Compiler Error – CS1527 elements defined in a namespace cannot b
In this blog post, you’ll learn more about the C# Compiler Error – CS1527 and the related message description C# Compiler Error Code CS1527 C# Compiler Description for the Code :CS1527 Elements defined in a namespace cannot be explicitly declared as private, protected, protected internal, or private protected