• /r/visualbasic
  • Math Accuracy Help

    Hello r/VB, I have a bit of a math problem on my hand. I am putting together a little calculator for my home brewing adventures, to calculate potential in alcohol production. I got my formulas, and tested them in google sheets to make sure they were working. I translated them to a small VB program. […]

  • /r/csharp
  • Is An If-Statement Following If That Returns Technically Equivalent to Else-If-Statement?

    Just out of curiosity, are there any technical differences between this: if (someVariable == someValue) { return; } else if (someOtherVariable == someOtherValue) { // do something. } and this: if (someVariable == someValue) { return; } if (someOtherVariable == someOtherValue) { // do something. } Obviously they are functionally the same. 😛 submitted by […]

  • /r/csharp
  • Question… what is more efficient. [string] != “” && [string] != “” or ![List].Contains()?

    I only want to refresh the data on the screen if the user has selected anything other then three specific values… these values are strings because they were user entered. My question is, which code is more efficient? string userValue_Lower = DataGrid.GetCellValue().ToLower(); if (userValue_Lower != “value1” && userValue_Lower != “value2” && userValue_Lower != “value3”) { […]