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
namespace ConsoleApp; | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Microsoft.VisualStudio.Threading; | |
class Program { | |
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
public class HierarchicalStringBuilder { | |
private struct Node { | |
public int Level { get; } | |
public string Prefix { get; } | |
public string Text { get; } | |
public Node(int level, string prefix, string text) { | |
(Level, Prefix, Text) = (level, prefix, text); | |
} | |
public override string ToString() { | |
return string.Format( "Node: {0}, {1}", Level, Text ); |
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
namespace System.Diagnostics.CodeAnalysis { | |
// Input: field, property, argument | |
// Output: field, property, argument, result | |
// AllowNull - Null input is allowed | |
// DisallowNull - Null input is disallowed | |
// MaybeNull - Output may be null | |
// MaybeNull/When - Output may be null (when result == true/false) |