15.4.08

HexaDecimal to Decimal

string DecimalString = Int32.Parse(Str,System.Globalization.NumberStyles.HexNumber).ToString()

7.4.08

Regex RegularExpression

Pattern#1
Regex objNotNaturalPattern=new Regex("[^0-9]");
Pattern#1 will match for strings other than 0 to 9.^ symbol is used for Specifying not condition.[] brackets if we are to give range values such as 0 - 9 or a-z or A-Z eg. abc will return true

Pattern#
Regex objNaturalPattern=new Regex("0*[1-9][0-9]*");
Pattern#2 will match for string which are Natural Numbers.Natural numbers Are numbers which are always greater than 0.The pattern 0* tells that a natural Number can be prefixed with any number of zero's or no zero's.the next [1-9] tells that it should contain atleast one number from 1 to 9 followed by any numbers of
0-9's

4.4.08

Regex.Ismatch


*IsMatch(String)
Indicates whether the regular expression specified in the Regex constructor finds a match in the input string.
*IsMatch(String, Int32)
Indicates whether the regular expression specified in the Regex constructor finds a match in the input string beginning at the specified starting position in the string.

*IsMatch(String, String)
Indicates whether the regular expression finds a match in the input string using the regular expression specified in the pattern parameter.

*IsMatch(String, String, RegexOptions)
Indicates whether the regular expression finds a match in the input string, using the regular expression specified in the pattern parameter and the matching options supplied in the options parameter.