Ad
  • Custom User Avatar

    thanks for taking the time to reply!

  • Custom User Avatar

    Essentially, there is no difference between string and String (capital S) in C#.

    String (capital S) is a class in the .NET framework in the System namespace. The fully qualified name is System.String. Whereas, the lower case string is an alias of System.String.

    Many developers use string to declare variables in C# and use System.String class to use any built-in string methods e.g., String.IsNullOrEmpty().

  • Custom User Avatar

    Should string be lowercase in the string.Join section? I understand it's being used as a method but it's from System. By convention, primitive data types like int, double, bool, and string are written in lowercase. This consistent casing helps distinguish them from user-defined classes. Is there an exception here?

  • Custom User Avatar

    I didn't think it was that simple

  • Custom User Avatar

    Why does a 3-line solution seem less clever to people than this?

  • Custom User Avatar

    C# random tests are failing with some weird input. I got the same input twice and expected result differs somehow. An example what is passed inside a method: "3135 5400 3656889".

    Though some logs in console show "[3, 1, 3, 5, 5, 4, 0, 0, 3, 6, 5, 6]"

    As much as three times the same input can be passed into a method, with two times passing and failing on a third time