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
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.