This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double x = 0; | |
while(x != 30) | |
x += 0.3; | |
System.Console.WriteLine("Done: " + x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double n = 0; | |
for(int x = 0; x < 20; x++) | |
{ | |
n+= 0.3; | |
} | |
n.Dump(); | |
(n == 6.0).Dump(); | |
((0.3 * 20) == 6.0).Dump(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stream stream = null; | |
try | |
{ | |
stream = new FileStream("file.txt", FileMode.OpenOrCreate); | |
using (StreamWriter writer = new StreamWriter(stream)) | |
{ | |
stream = null; | |
// Use the writer object... | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (Stream stream = new FileStream("file.txt", FileMode.OpenOrCreate)) | |
{ | |
using (StreamWriter writer = new StreamWriter(stream)) | |
{ | |
// Use the writer object... | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="WpfApplication2.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MainWindow" Height="350" Width="525"> | |
<Window.Resources> | |
<!-- These can go into the global styles--> | |
<Style TargetType="{x:Type Label}"> | |
<Setter Property="TextBlock.TextAlignment" Value="Right" /> | |
<Setter Property="Margin" Value="5,5,10,5" /> | |
</Style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="WpfApplication2.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MainWindow" Height="350" Width="525"> | |
<Window.Resources> | |
<!-- These can go into the global styles--> | |
<Style TargetType="{x:Type Label}"> | |
<Setter Property="TextBlock.TextAlignment" Value="Right" /> | |
<Setter Property="Margin" Value="5,5,10,5" /> | |
<Setter Property="Height" Value="30" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4000000000000000000000001d-4000000000000000000000000d | |
4000000000000000000000001m-4000000000000000000000000m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Not written in an IDE | |
class MyViewModel | |
{ | |
MyViewModelStepEnum CurrentStep { get; set; } | |
enum MyViewModelStepEnum { | |
Step 1, Step2 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private struct Entry | |
{ | |
public int hashCode; | |
public int next; | |
public TKey key; | |
public TValue value; | |
} | |
private Dictionary<TKey, TValue>.Entry[] entries; | |
private int[] buckets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NUnitTestCaseStackTraceParser : AttributeStackTraceParser | |
{ | |
protected override string GetAttributeType() | |
{ | |
return typeof(TestCaseAttribute).FullName; | |
} | |
public override string ForTestingFramework | |
{ |
OlderNewer