string str="(1,10,100,1000,10000,)";
str=str.Trim('(').Trim(')').Trim(',');//去掉开头和结尾的“(”、“)”和“,”
string[] strArr=str.Split(',');
for(int i=0;i<strArr.Length;i++)
{
Response.Write(strArr[i]+"<br>");
}
str=str.Trim('(').Trim(')').Trim(',');//去掉开头和结尾的“(”、“)”和“,”
string[] strArr=str.Split(',');
for(int i=0;i<strArr.Length;i++)
{
Response.Write(strArr[i]+"<br>");
}
输出为
1
10
100
1000
10000
+++++++++++++++++++++++++++++++++
double ab=Convert.ToDouble(this.TextBox1.Text);
double ac=Convert.ToDouble(this.TextBox2.Text);
this.Label1.Text = Convert.ToDouble(ab / (ab + ac)).ToString("0.00%");