Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions CSharp/How not to display Hellow World.cs
Original file line number Diff line number Diff line change
@@ -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;
}

}

}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)