Skip to main content
added 1 character in body
Source Link
Jonas Wilms
  • 137.9k
  • 20
  • 26

I changed a variable name from somethinglong to s

But ... why? Does a "oneliner" make your answer better? Or does having some clearer names instead of that cryptic s and sn2 make your answer better? I think the laterlatter.

  Dim result = String.Join(
    ",", 
    File.ReadAllLines(newFile1)
        .Select(Function(input) input.Split(","c)(1))
  )

Your code will always overflow somewhere on some devices, so I would not try to format your code in a way that it does not overflow, focus on readability instead.

That said, yes it is strange that accepting an answer changes the layout, I'd consider that a bug (although a minor, less important one).

I changed a variable name from somethinglong to s

But ... why? Does a "oneliner" make your answer better? Or does having some clearer names instead of that cryptic s and sn2 make your answer better? I think the later.

  Dim result = String.Join(
    ",", 
    File.ReadAllLines(newFile1)
        .Select(Function(input) input.Split(","c)(1))
  )

Your code will always overflow somewhere on some devices, so I would not try to format your code in a way that it does not overflow, focus on readability instead.

That said, yes it is strange that accepting an answer changes the layout, I'd consider that a bug (although a minor, less important one).

I changed a variable name from somethinglong to s

But ... why? Does a "oneliner" make your answer better? Or does having some clearer names instead of that cryptic s and sn2 make your answer better? I think the latter.

  Dim result = String.Join(
    ",", 
    File.ReadAllLines(newFile1)
        .Select(Function(input) input.Split(","c)(1))
  )

Your code will always overflow somewhere on some devices, so I would not try to format your code in a way that it does not overflow, focus on readability instead.

That said, yes it is strange that accepting an answer changes the layout, I'd consider that a bug (although a minor, less important one).

Source Link
Jonas Wilms
  • 137.9k
  • 20
  • 26

I changed a variable name from somethinglong to s

But ... why? Does a "oneliner" make your answer better? Or does having some clearer names instead of that cryptic s and sn2 make your answer better? I think the later.

  Dim result = String.Join(
    ",", 
    File.ReadAllLines(newFile1)
        .Select(Function(input) input.Split(","c)(1))
  )

Your code will always overflow somewhere on some devices, so I would not try to format your code in a way that it does not overflow, focus on readability instead.

That said, yes it is strange that accepting an answer changes the layout, I'd consider that a bug (although a minor, less important one).