本文整理汇总了C#中Char类的典型用法代码示例。如果您正苦于以下问题:C#Char类的具体用法?C#Char怎么用?C#Char使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:PosTest2
publicboolPosTest2()
{
boolretVal=true;
//Addyourscenariodescriptionhere
TestLibrary.TestFramework.BeginScenario("PosTest2:VerifymethodGetByteCount(Char[],Int32,Int32)withnullchar[]");
try
{
Char[]chars=newChar[]{};
UTF8Encodingutf8=newUTF8Encoding();
intbyteCount=utf8.GetByteCount(chars,0,0);
if(byteCount!=0)
{
TestLibrary.TestFramework.LogError("001.1","MethodGetByteCountErr.");
retVal=false;
}
}
catch(Exceptione)
{
TestLibrary.TestFramework.LogError("001","Unexpectedexception:"+e);
TestLibrary.TestFramework.LogInformation(e.StackTrace);
retVal=false;
}
returnretVal;
}
原文链接:
http://www.jxszl.com/biancheng/C/556732.html