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; | |
using HtmlAgilityPack; | |
namespace ConsoleApplication16 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
// Autogenerated, do not edit | |
#include "../../Native/AllUrho.h" | |
#include "../../Native/interop.h" | |
using namespace Urho3D; | |
extern "C" { | |
DllExport void * | |
RefCount_RefCount () | |
{ | |
return new RefCount(); | |
} |
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
static int Case(bool b) | |
{ | |
switch (b) | |
{ | |
case true: | |
return 1; | |
case false: | |
return 2; | |
default: | |
return 3; |
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; | |
namespace ConsoleApp1 | |
{ | |
public class Program | |
{ | |
public struct Foo | |
{ | |
//private int foo; | |
} |
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
class P { static void Main() {} } | |
class X<A,B,C,D,E,F> { class Y:X<Y,Y,Y,Y,Y, Y> { Y.Y.Y.Y.Y.Y.Y.Y.Y y; } } |
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.Data.SqlClient; | |
namespace ConsoleApp1 | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var cs = @"Server=EGORBO\SQLEXPRESS;Database=testo;User Id=sa;Password=qwerty123;"; | |
using (var connection1 = new SqlConnection(cs)) |
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
//STEP 1: open a socket and network streams | |
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); | |
socket.Connect("localhost", 1433); | |
var tcpStream = new NetworkStream(socket, true); | |
var sslOverTdsStream = new SslOverTdsStream(tcpStream); //simple Stream wrapper - https://github.com/dotnet/corefx/blob/master/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SslOverTdsStream.cs | |
var sslStream = new SslStream(sslOverTdsStream, leaveInnerStreamOpen: true, userCertificateValidationCallback: new RemoteCertificateValidationCallback(ValidateServerCertificate), userCertificateSelectionCallback: null); | |
//STEP 2: send & receive data via tcpStream (not ssl) | |
tcpStream.Write... |
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; | |
namespace StaticTest | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
//args are empty but .NET and MONO will init Foo anyway, .NET core - won't. | |
var obj = args.Length > 0 ? Foo.Instance : null; |
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; | |
namespace StaticTest | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
//args are empty but .NET and MONO will init Foo anyway, .NET core - won't. | |
var obj = args.Length > 0 ? Foo.Instance : null; |
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.IO; | |
using System.Net.Security; | |
using System.Net.Sockets; | |
using System.Text; | |
namespace SslBug | |
{ | |
class Program | |
{ |
OlderNewer