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