[Convert string to decimal]
string s = "123.45";
decimal de = decimal.Parse(s);
[Convert string to integer]
string s = "123";
int iSIN = Int32.Parse(s);
[Read field of tinyint from DB and convert to int and string]
int iTemp = (int)reader_src.GetOrdinal(g_strField[iLpCnt]);
strTemp = iTemp.ToString();
[Format integer to string with fixed length]
String.Format("{0:X}", iRecID).PadLeft(5, '0')
[Convert byte array to string]
byte [] szContent;
szContent = System.Convert.FromBase64String(strContentIn);
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
string strLog = enc.GetString(szContent);
Monday, January 25, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment