diff --git a/CSharp/How not to display Hellow World.cs b/CSharp/How not to display Hellow World.cs new file mode 100644 index 0000000..23854ca --- /dev/null +++ b/CSharp/How not to display Hellow World.cs @@ -0,0 +1,48 @@ +namespace How_not_to_display_Hello_World +{ + class Program + { + static void Main(string[] args) + { + Display d = new Display(); + d.DisplayString("Hello, World!"); + } + } + + class Display + { + public void DisplayString(string input) + { + System.Console.WriteLine(BuildSenstence(BuildChar(input))); + } + + public string BuildSenstence(char[] input) + { + string final = ""; + foreach(char s in input) + { + final += $" {s}"; + } + return final; + } + + public char[] BuildChar(string input) + { + char[] s = input.ToCharArray(); + + char[] chars = { }; + int i = 0; + + foreach (char se in s) + { + System.Array.Resize(ref chars, chars.Length + 1); + chars[i] = se; + i++; + } + + return chars; + } + + } + +} diff --git a/README.md b/README.md index 6a06bbd..e26b734 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,4 @@ Feel free to add your username here :) * [MauricioLanda](https://github.com/MauricioLanda) * [ShannonMCook](https://github.com/shannonmcook) * [Lashuk1729](https://github.com/Lashuk1729) +* [Lilwiggy](https://github.com/Lilwiggy)