Skip to content

Instantly share code, notes, and snippets.

namespace ConsoleApp;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.VisualStudio.Threading;
class Program {
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 );
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)