① String AX = string. empty;
Note: Do not use: String AX = ""; I don't konw why. But it's Microsoft's convention.
Determine whether ax is null:
Ax. Length = 0> AX = string. Empty
info: "To test for empty strings, check if string. length is
equal to zero. constructs such "". equals (somestring)
and string. empty. equals (somestring) are less efficient
than testing the string length. replace these with
checks for somestring. length = 0. "
2007-7-13 13:51:10
② Catch {} Should catch detailed exceptions and do not throw them.
Catch the specific exception than "system. Exception" or rethrow the exception.
Catching generic exception types can hide run-time problems from the library user,
And can complicate debugging.
③ Do not use. tolower ()/. toupper () when comparing strings ()
Replace by equals ()
Don't create a string never used later.
[To be continued]
Blog garden → axe to help Shao Zhu