frankcollins3 / fcc-mcsft-cSharp

FreeCodeCamp & Microsoft C# course:
1 stars 0 forks source link

2nd argument of overloaded method does nothing [11:36pm] #27

Closed frankcollins3 closed 1 year ago

frankcollins3 commented 1 year ago

attempting to do: Screen Shot 2023-09-09 at 11 35 23 PM

Screen Shot 2023-09-09 at 11 35 28 PM

error: Screen Shot 2023-09-09 at 11 35 36 PM

proposed approach: use dashes, as the microsoft provided example does.

possible improvements:

frankcollins3 commented 1 year ago
➜  TestProject git:(master) ✗ dotnet run
A 360 flip is technically 2: pop shuvits and a kickflip
   pad this
                         pad this
➜  TestProject git:(master) ✗

expected output: ---------------pad this

frankcollins3 commented 1 year ago

👎 my example. when adding the second arg it's not supposed to have the parenthesis Console.WriteLine(input.PadLeft(11); Console.WriteLine(input.PadLeft(33), '-'); // Console.WriteLine(input.PadLeft(33), '-');

👍 microsoft example with both arguments in the parenthesis: // Console.WriteLine(input.PadLeft(12, '-')); // Console.WriteLine(input.PadRight(12, '-')); [11:41pm]