CompareTo 这是字符串比较的函数,用法:string s1 = "c"; string s2 = "b";if(s1.CompareTo(s2)==1){}它有三个返回值~:当s1>s2时,s1.CompareTo(s2)==1当s1=s2时,s1.CompareTo(s2)==0当s1<s2时,s1.CompareTo(s2)==-1以上为例,c的asc大于b的asc,所以返回1
posted on 2013-05-08 11:21 。! 阅读(1962) 评论(0) 编辑 收藏 举报