C#写法 string TxtRights =""; CurRight=0; for(int i=0;i<5;i++) { if ( ((Convert.ToInt32(Rights) & (int)Math.Pow(2,i)) ==(int)Math.Pow(2,i); )) { CurRight= (int)Math.Pow(2,i);; TxtRights = TxtRights+","+ CurRight; } } ----------------------------------Rights ------ VB写法 TxtRights="" For i=0 To 12 If (Rights And (2^i))<>0 Then CurRight=2^i TxtRights=TxtRights&","&CurRight End If Next
posted on
2006-05-24 23:48DODONG
阅读(475)
评论(0)
编辑收藏举报