本文整理汇总了C#中System.Text.UTF7Encoding.GetMaxCharCount方法的典型用法代码示例。如果您正苦于以下问题:C# UTF7Encoding.GetMaxCharCount方法的具体用法?C# UTF7Encoding.GetMaxCharCount怎么用?C# UTF7Encoding.GetMaxCharCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Text.UTF7Encoding
的用法示例。
在下文中一共展示了UTF7Encoding.GetMaxCharCount方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NegTest1
public void NegTest1()
{
UTF7Encoding utf7 = new UTF7Encoding();
int byteCount = -1;
Assert.Throws<ArgumentOutOfRangeException>(() =>
{
int maxCharCount = utf7.GetMaxCharCount(byteCount);
});
}
示例2: TestMaxCharCount
public void TestMaxCharCount()
{
UTF7Encoding UTF7enc = new UTF7Encoding ();
Assertion.AssertEquals ("UTF #1", 50, UTF7enc.GetMaxCharCount(50));
}
示例3: PosTest3
public void PosTest3()
{
int byteCount = Int32.MaxValue;
UTF7Encoding utf7 = new UTF7Encoding();
int maxCharCount = utf7.GetMaxCharCount(byteCount);
}
示例4: PosTest2
public void PosTest2()
{
int byteCount = 0;
UTF7Encoding utf7 = new UTF7Encoding();
int maxCharCount = utf7.GetMaxCharCount(byteCount);
}
示例5: PosTest1
public void PosTest1()
{
int byteCount = TestLibrary.Generator.GetInt32(-55);
UTF7Encoding utf7 = new UTF7Encoding();
int maxCharCount = utf7.GetMaxCharCount(byteCount);
}
示例6: TestMaxCharCount
public void TestMaxCharCount()
{
UTF7Encoding UTF7enc = new UTF7Encoding ();
Assert.AreEqual (50, UTF7enc.GetMaxCharCount(50), "UTF #1");
}