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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace PlayWithIndex | |
{ | |
class Program | |
{ | |
static void Main() | |
{ |
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
// nuget:Newtonsoft.Json.Schema | |
using System; | |
using Newtonsoft.Json.Schema; | |
using Newtonsoft.Json.Schema.Generation; | |
//nuget Newtonsoft.Json.Schema v2.0.8 | |
public class Program | |
{ |
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 System; | |
using System.Collections.Generic; | |
using Newtonsoft.Json; | |
using System.Reflection; | |
using System.Runtime.Versioning; | |
namespace JsonSerializeDeserialize | |
{ | |
public class Test | |
{ |
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 System; | |
public class Example | |
{ | |
public static void Main() | |
{ | |
var x = Math.Round(11.1, MidpointRounding.AwayFromZero); | |
} | |
} |
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
<Grid> | |
<StackPanel> | |
<Button Margin="10" Width="100" Height="30" Content="Click Me" x:Name="btn"/> | |
<TextBlock Margin="10" Text="Hello, styled world!" FontSize="28" HorizontalAlignment="Center" VerticalAlignment="Center"> | |
<TextBlock.Style> | |
<Style TargetType="TextBlock"> | |
<Setter Property="Foreground" Value="Blue"></Setter> | |
<Style.Triggers> | |
<Trigger Property="IsMouseOver" Value="True"> | |
<Setter Property="Foreground" Value="Red" /> |
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 System; | |
public class trydotnet_running_on_unix | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine(Environment.OSVersion.ToString()); | |
} | |
} |
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 System; | |
using System.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var guid= Guid.NewGuid(); | |
Console.WriteLine($"Guid={guid}"); |
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
System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName | |
Environment.GetCommandLineArgs()[0] |
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
var ip= "192.168.179.1"; | |
var name = "abcdefgd"; | |
var commandTitle = $"echo -n -e \"\\033]0;[{name}]\\007\""; | |
var commandPing = $"ping {ip}"; | |
File.WriteAllText("ping.command", $"{commandTitle}\n{commandPing}\n"); | |
var commandLine= $"chmod +x ping.command; open ping.command"; | |
new Process() | |
{ |
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
# cake.build | |
**/tools/** | |
!**/tools/packages.config | |
tools/** | |
!tools/packages.config |