yotiky Tech Blog

とあるエンジニアの備忘録

2023-12-11から1日間の記事一覧

C# - 相対パスでオブジェクト参照を辿るツリー構造のサンプル

ツリー構造を成すクラスの親クラス。 public abstract class Node { protected const string Slash = "/"; [XmlIgnore] public Node Parent { get; set; } public Node GetReferencedNode(string referencePath) { var path = referencePath; var target = t…