Category: C#
C# Compiler Error – CS8158 cannot return by reference a member of ‘
In this blog post, you’ll learn more about the C# Compiler Error – CS8158 and the related message description C# Compiler Error Code CS8158 C# Compiler Description for the Code :CS8158 Cannot return by reference a member of ‘{0}’ because it was initialized to a value that cannot be returned by reference
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