FileStream文件流的读写方式: 文件流读文件 [crayon-681275ff060ef1024750 […]
题一://翻转字符串s
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
string s = "asdfghjk"; for (int i = s.Length-1; i >= 0;i-- )//遍历的方式倒序输出 { Console.Write(s[i]); } Console.ReadKey(); } 方法二: string s = "asdfghjk"; char[] chs= s.ToCharArray(); for (int i = 0; i < s.Length/2; i++)//首尾交换 { char temp = chs[i]; chs[i] = chs[s.Length - i - 1]; chs[s.Length - i - 1] = temp; } //s=chs.ToString();//错误 s = new string(chs);//字符数组转字符串 不能直接这样转s=chs.ToString() Console.Write(s); Console.ReadKey(); |
注意: 一:字符串数 […]
图片透明度的设置代码:
1 2 3 4 5 6 7 |
filter:alpha(opacity=40); -moz-opacity:0.4; -khtml-opacity: 0.4; opacity: 0.4; |