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
using System; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
namespace MyConsoleHelper | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
using System; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace MyConsoleHelper | |
{ | |
class PropertyAndFields | |
{ | |
public string StringProperty { get; set; } | |
public string StringField; |
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
// Licensed to the .NET Foundation under one or more agreements. | |
// The .NET Foundation licenses this file to you under the MIT license. | |
// See the LICENSE file in the project root for more information. | |
using System.Linq; | |
using Xunit; | |
namespace MegaTests | |
{ | |
public class SuperTests |
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
[Flags] | |
public enum TargetFrameworkMonikers | |
{ | |
Net45 = 0x1, | |
Net451 = 0x2, | |
Net452 = 0x4, | |
Net46 = 0x8, | |
Net461 = 0x10, | |
Net462 = 0x20, | |
Net463 = 0x40, |
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
using System.Threading; | |
namespace ConsoleApp | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var t = new Thread(() => { }); | |
t.IsBackground = true; |
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
using System; | |
using System.Threading; | |
namespace ConsoleApplication | |
{ | |
internal class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine(new ThreadInterruptedException().Message); |
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
using System.Threading; | |
namespace ConsoleApplication | |
{ | |
internal class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var t = new Timer(new TimerCallback(_ => { }), null, 1, 1); | |
t.Dispose(); |
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
using System.Threading; | |
namespace ConsoleApplication | |
{ | |
internal class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var t = new Timer(new TimerCallback(_ => { }), null, 1, 1); | |
t.Dispose(); |
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
using System; | |
using System.Threading; | |
namespace ConsoleApplication | |
{ | |
internal class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var maxThreads = 0x7fff; |
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
// each line throws NotSupported/NotImplemented exceptions: | |
//1 | |
CompressedStack compressedStack = CompressedStack.Capture(); | |
//2 | |
Thread.CurrentThread.DisableComObjectEagerCleanup(); |