Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions csharp/getting-started/WeatherMicroservice/.dockerignore

This file was deleted.

11 changes: 0 additions & 11 deletions csharp/getting-started/WeatherMicroservice/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions csharp/getting-started/WeatherMicroservice/Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions csharp/getting-started/WeatherMicroservice/Extensions.cs

This file was deleted.

24 changes: 0 additions & 24 deletions csharp/getting-started/WeatherMicroservice/Program.cs

This file was deleted.

This file was deleted.

67 changes: 0 additions & 67 deletions csharp/getting-started/WeatherMicroservice/Startup.cs

This file was deleted.

This file was deleted.

36 changes: 0 additions & 36 deletions csharp/getting-started/WeatherMicroservice/WeatherReport.cs

This file was deleted.

2 changes: 1 addition & 1 deletion csharp/getting-started/console-linq/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void Main(string[] args)
{
var startingDeck = (from s in Suits().LogQuery("Suit Generation")
from r in Ranks().LogQuery("Value Generation")
select new PlayingCard(s, r))
select new { Suit = s, Rank = r })
.LogQuery("Starting Deck")
.ToArray();

Expand Down
1 change: 1 addition & 0 deletions csharp/getting-started/console-linq/extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public static bool SequenceEquals<T>
public static IEnumerable<T> LogQuery<T>
(this IEnumerable<T> sequence, string tag)
{
// File.AppendText creates a new file if the file doesn't exist.
using (var writer = File.AppendText("debug.log"))
{
writer.WriteLine($"Executing Query {tag}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ using namespace System::Collections::Generic;

void main()
{
// Create and initialize a new LinkedList.
LinkedList< String^ > ^ ll = gcnew LinkedList< String^ >;
ll->AddLast( L"red" );
ll->AddLast( L"orange" );
ll->AddLast( L"yellow" );
ll->AddLast( L"orange" );
// Display the contents of the LinkedList.
if ( ll->Count > 0 )
{
Console::WriteLine( L"The first item in the list is {0}.", ll->First->Value );
Console::WriteLine( L"The last item in the list is {0}.", ll->Last->Value );
Console::WriteLine( L"The LinkedList contains:" );

for each (String^ s in ll)
{
Console::WriteLine( L" {0}", s );
}
}
else
{
Console::WriteLine( L"The LinkedList is empty." );
}
// Create and initialize a new LinkedList.
LinkedList< String^ > ^ ll = gcnew LinkedList< String^ >;
ll->AddLast(L"red");
ll->AddLast(L"orange");
ll->AddLast(L"yellow");
ll->AddLast(L"orange");

// Display the contents of the LinkedList.
if (ll->Count > 0)
{
Console::WriteLine(L"The first item in the list is {0}.", ll->First->Value);
Console::WriteLine(L"The last item in the list is {0}.", ll->Last->Value);
Console::WriteLine(L"The LinkedList contains:");

for each (String^ s in ll)
{
Console::WriteLine(L" {0}", s);
}
}
else
{
Console::WriteLine(L"The LinkedList is empty.");
}
}

/* This code produces the following output.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
using System.Collections;
using System.Collections.Generic;

public class GenericCollection
public class GenericCollection
{
public static void Main()
{
// Create and initialize a new LinkedList.
LinkedList<String> ll = new LinkedList<String>();
ll.AddLast( "red" );
ll.AddLast( "orange" );
ll.AddLast( "yellow" );
ll.AddLast( "orange" );
public static void Main()
{
// Create and initialize a new LinkedList.
LinkedList<String> ll = new LinkedList<String>();
ll.AddLast("red");
ll.AddLast("orange");
ll.AddLast("yellow");
ll.AddLast("orange");

// Display the contents of the LinkedList.
if ( ll.Count > 0 )
{
Console.WriteLine( "The item in the list is {0}.", ll.First.Value );
Console.WriteLine( "The item in the list is {0}.", ll.Last.Value );
// Display the contents of the LinkedList.
if (ll.Count > 0)
{
Console.WriteLine("The first item in the list is {0}.", ll.First.Value);
Console.WriteLine("The last item in the list is {0}.", ll.Last.Value);

Console.WriteLine( "The LinkedList contains:" );
foreach ( String s in ll )
Console.WriteLine( " {0}", s);
}
else
{
Console.WriteLine("The LinkedList is empty.");
}
}
Console.WriteLine("The LinkedList contains:");
foreach (String s in ll)
Console.WriteLine(" {0}", s);
}
else
{
Console.WriteLine("The LinkedList is empty.");
}
}
}

/* This code produces the following output.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void Main()
fs.Read(bytes, 0, (int)fs.Length);
fs.Close();

String decodedString = utf8.GetString(encodedBytes);
String decodedString = utf8.GetString(bytes);
Console.WriteLine("Decoded bytes:");
Console.WriteLine(decodedString);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void Main()
fs.Read(bytes, 0, (int)fs.Length);
fs.Close();

String decodedString = unicode.GetString(encodedBytes);
String decodedString = unicode.GetString(bytes);
Console.WriteLine("Decoded bytes:");
Console.WriteLine(decodedString);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static void Main()
fs.Read(bytes, 0, (int)fs.Length);
fs.Close();

String decodedString = enc.GetString(encodedBytes);
String decodedString = enc.GetString(bytes);
Console.WriteLine("Decoded bytes from binary file:");
Console.WriteLine(decodedString);
}
Expand Down
Loading