GetMaxByteCount() public méthode

public GetMaxByteCount ( int charCount ) : int
charCount int
Résultat int
 private void DoNegAOORTest(ASCIIEncoding ascii, int charCount)
 {
     Assert.Throws<ArgumentOutOfRangeException>(() =>
     {
         ascii.GetMaxByteCount(charCount);
     });
 }
        private void DoPosTest(ASCIIEncoding ascii, int charCount, int expectedValue)
        {
            int actualValue;

            ascii = new ASCIIEncoding();
            actualValue = ascii.GetMaxByteCount(charCount);
            Assert.Equal(expectedValue, actualValue);
        }
 static public int GetMaxByteCount(IntPtr l)
 {
     try {
         System.Text.ASCIIEncoding self = (System.Text.ASCIIEncoding)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         var ret = self.GetMaxByteCount(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }