2020-01-01から1ヶ月間の記事一覧

.NET C# - How to check if all leaves are in WinForms TreeView.

C#

You could easily make this into an extension methods like this. public static class ExtensionMethods { public static bool AllLeavesChecked(this TreeNode treeNode) { if (treeNode.Nodes.Count == 0) { return treeNode.Checked; } else { bool re…

【C#】【VB.NET】Listや配列を1行のLinqクエリで列挙する

Listや配列を簡潔に列挙する手法をノートします参考サイト stackoverflow.comC#の場合 class Student { public int Code; public string Name; public Student(int p1, string p2) { Code = p1; Name = p2; } } class Program { static void Main(string[] a…