Skip to content

Instantly share code, notes, and snippets.

//If you copy and paste this, you'll need to change the x:Class value
<UserControl x:Class="Waterloo.ProjectKiwi.CustomEditorControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Grid.RowDefinitions>
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
string HCDownloadURL = String.Format("http://www.survivaloperations.net/client/hardcorps/HardCorps.zip");
WebClient Download_Client = new WebClient();//Declaring the webclient as Download_Client
Download_Client.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);//the event handler
The thread 0xc8c has exited with code 0 (0x0).
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in Microsoft.VisualStudio.Text.Data.dll
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in Microsoft.VisualStudio.Platform.VSEditor.dll
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>DefaultDomain</AppDomain><Exception><ExceptionType>System.ArgumentOutOfRangeException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Specified argument was out of the range of valid values.
Parameter name: span</Message><StackTrace> at Microsoft.VisualStudio.Text.SnapshotSpan..ctor(ITextSnapshot snapshot, Span span)
at Microsoft.VisualStudio
int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };
int oddNumbers = numbers.Count(n => n % 2 == 1);
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
var tree = CSharpSyntaxTree.ParseText(@"
public class MyClass
{
public void MyMethod()
{
}
}");
var tree = CSharpSyntaxTree.ParseText(@"
public class MyClass
{
public void MyMethod()
{
}
public void MyMethod(int n)
{
}
}");
var tree = CSharpSyntaxTree.ParseText(@"
public class MyClass
{
public void MyMethod()
{
}
public void MyMethod(int n)
{
}
}");
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
var tree = CSharpSyntaxTree.ParseText(@"
public class MyClass
{
public void MyMethod()
{
}
}");
class SimpleClass
{
public void SimpleMethod()
{
}
}
@JoshVarty
JoshVarty / SimpleClass
Created July 11, 2014 17:31
Simple Class made up of Syntax Nodes and Tokens
class SimpleClass
{
public void SimpleMethod()
{
}
}