This file contains hidden or 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
void Main() | |
{ | |
var listOfI = GetInts(); | |
foreach (var i in listOfI) | |
{ | |
Console.WriteLine(i); | |
} | |
Console.WriteLine("******"); | |
Console.WriteLine("jetzt 1-stellige"); |
This file contains hidden or 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
// Needs System.Net; | |
// Prefer HttpClient for real situations other than testing | |
void Main() | |
{ | |
while(true) { | |
try { | |
var url = "http://example.com/sub/dir/page.aspx?a=1234&b=something"; | |
var request = (System.Net.HttpWebRequest) System.Net.WebRequest.Create (url); | |
var response = (System.Net.HttpWebResponse)request.GetResponse (); |
This file contains hidden or 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
var set1 = new string[]{"a","b","c","d"}; | |
var set2 = new string[]{"a","e","i","o","u"}; | |
var q = set1.Except(set2); | |
Console.WriteLine(q.Count()); | |
Console.WriteLine(""); | |
foreach(string s in q) | |
{ | |
Console.WriteLine(s); |
This file contains hidden or 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
void Main() | |
{ | |
var system = ActorSystem.Create("MySystem"); | |
var greeters = system.ActorOf(Props.Create(() => new DeviceSplitter())); | |
var r = new System.Random(); | |
var measures = Enumerable.Repeat(new [] {"a","b","c","d"}, 250000) | |
.SelectMany(c => c) | |
.Select (id => new Measure(id,r.Next())); | |
foreach (var m in measures) greeters.Tell(m); | |
Console.ReadLine(); |
This file contains hidden or 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
<Query Kind="Program"> | |
<Reference><RuntimeDirectory>\System.Windows.Forms.DataVisualization.dll</Reference> | |
<Reference><RuntimeDirectory>\System.Windows.Forms.dll</Reference> | |
<Namespace>System.Windows.Forms.DataVisualization.Charting</Namespace> | |
<Namespace>System.Drawing</Namespace> | |
<Namespace>System.Windows.Forms</Namespace> | |
</Query> | |
void Main() | |
{ |
This file contains hidden or 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
void Main() | |
{ | |
var instanceName = "LINQPad"; | |
var counterCollectionInterval = TimeSpan.FromSeconds(1); | |
var continueCollectingTimeFrame = TimeSpan.FromSeconds(10); | |
var counters = from performanceCounterDefinition in PerformanceCounterRepository.GetPerfCounters | |
from counterName in performanceCounterDefinition.Counters | |
select new { |
This file contains hidden or 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
void Main() | |
{ | |
var databaseInfo = GetDatabaseInfo(this); | |
databaseInfo.Dump(); | |
} | |
// Define other methods and classes here | |
public class DatabaseInfo | |
{ | |
public Type DataContextType { get; set; } |
This file contains hidden or 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
//You'll have to run this example in LinqPad as a C# program. | |
//Or put a class around the two global methods and change .Dump() calls to Console.WriteLine | |
void Main() | |
{ | |
var frm = new Form1(); | |
frm.Controls[0].KeyPress += keypressed_inMain; | |
frm.ShowDialog(); | |
} |
This file contains hidden or 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
NuGet.exe update m:\1.GitHub\TaxiSMS\CompleteSolution\CompleteSolution\CompleteSolution.sln -Id Newtonsoft.Json |
This file contains hidden or 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
nuget pack Foo.xxproj -Prop Configuration=Release |
OlderNewer