Distance.Parse throws an exception when a number with an unrecognized unit is entered:
```
Distance.Parse("3 this should not be valid");
```
This is fine, but if the number is removed:
```
Distance.Parse("this should not be valid");
```
Then the function returns a Distance object set to "0 ft" and IsInvalid=false.
Invalid text without a number should throw an exception.
Comments: ** Comment from web user: RayHarwood **
```
Distance.Parse("3 this should not be valid");
```
This is fine, but if the number is removed:
```
Distance.Parse("this should not be valid");
```
Then the function returns a Distance object set to "0 ft" and IsInvalid=false.
Invalid text without a number should throw an exception.
Comments: ** Comment from web user: RayHarwood **
For VB, this is actually "technically consistent". In the first case, it parses a 3 and discards the rest. In the second case, it cannot find any valid numerical at the beginning, so it throws an error.
I recommend using the alternative TryParse instead.