Skip to content

Instantly share code, notes, and snippets.

[CompilerGenerated]
internal static class $program
{
private static void $main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
namespace HelloWorld
{
class Hello
{
static void Main(string[] args)
{
System.Console.WriteLine("Hello World!");
}
}
}
namespace HelloWorld; public class Hello
{
static void Main (string[] args)
{
System.Console.WriteLine("Hello World!");
}
}
namespace Company.Product;
Company.Product.Component
namespace Component
{
}
public class DataSlice
{
public string DataLabel { get; }
public float DataValue { get; }
public DataSlice(string dataLabel, float dataValue)
{
DataLabel = dataLabel;
DataValue = dataValue;
}
var adultData = new DataSlice("Vaccinated adults", 741);
public class DataSlice(string dataLabel, float dataValue)
{
public string DataLabel
{
get => dataLabel;
set
{
if (value < 0) throw new ArgumentOutOfRangeException();
dataLabel = value;
}
string path = "c:\\path\\backslashes";
string path = @"c:\pathh\backslashes";
string xml = """
<part number="2021">
<name>year</name>
<description>this is the actual year
<ref part="2020">year</ref> actual year.
</description>
</part>
""";
string xml = """"
Now """ is safe to use in your raw string.
"""";