Last active
October 25, 2023 22:24
-
-
Save ochsec/7343813b13386da6c6ad535af212bebd to your computer and use it in GitHub Desktop.
Revisions
-
ochsec revised this gist
Oct 25, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ static void Main(string[] args) var emporersNewProp = mcNull.foo; // Print the values of the emperorsNewProp Console.WriteLine("emporersNewProp: " + emporersNewProp); } } -
ochsec revised this gist
Oct 25, 2023 . 2 changed files with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -29,9 +29,9 @@ static void Main(string[] args) mcNull.baz.Add(2); mcNull.baz.Add(3); var emporersNewProp = mcNull.foo; // Print the values of the properties Console.WriteLine("emporersNewProp: " + emporersNewProp); } } File renamed without changes. -
ochsec created this gist
Oct 25, 2023 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ using System; using System.Collections.Generic; class McNull { public string foo { get; set; } public int bar { get; set; } public List<int> baz { get; set; } public McNull(int aBar) { bar = aBar; baz = new List<int>(); } } class Program { static void Main(string[] args) { // Create an instance of McNull with aBar = 42 McNull mcNull = new McNull(42); // Set the foo property // actually, I forgot // Add some values to the baz list mcNull.baz.Add(1); mcNull.baz.Add(2); mcNull.baz.Add(3); // Print the values of the properties Console.WriteLine("foo: " + mcNull.foo); Console.WriteLine("bar: " + mcNull.bar); Console.WriteLine("baz: " + string.Join(", ", mcNull.baz)); } } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net7.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> </Project>