Skip to main content
Code Review

Return to Answer

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

Update
As mjolka mjolka has pointed out in the [chat] , this can be simplified using the EndsWith() method

Update
As mjolka has pointed out in the [chat] , this can be simplified using the EndsWith() method

Update
As mjolka has pointed out in the [chat] , this can be simplified using the EndsWith() method

added 1 character in body
Source Link
Heslacher
  • 50.9k
  • 5
  • 83
  • 177
added 405 characters in body
Source Link
Heslacher
  • 50.9k
  • 5
  • 83
  • 177

Update
As mjolka has pointed out in the [chat], this can be simplified using the EndsWith() method

private static bool ShouldExit(String input) 
{
 return input.EndsWith("exit", StringComparison.OrdinalIgnoreCase);
}

Now let us focus on validating the given input. As we don't have separating spaces anymore the current logic doesn't work anymore.

Now let us focus on validating the given input. As we don't have separating spaces anymore the current logic doesn't work anymore.

Update
As mjolka has pointed out in the [chat], this can be simplified using the EndsWith() method

private static bool ShouldExit(String input) 
{
 return input.EndsWith("exit", StringComparison.OrdinalIgnoreCase);
}

Now let us focus on validating the given input. As we don't have separating spaces anymore the current logic doesn't work anymore.

Source Link
Heslacher
  • 50.9k
  • 5
  • 83
  • 177
Loading
lang-cs

AltStyle によって変換されたページ (->オリジナル) /