Renci.SshNet.Common.ASCIIEncoding.GetByteCount C# (CSharp) Method

GetByteCount() public method

Calculates the number of bytes produced by encoding a set of characters from the specified character array.
is null. or is less than zero.-or- and do not denote a valid range in .
public GetByteCount ( char chars, int index, int count ) : int
chars char The character array containing the set of characters to encode.
index int The index of the first character to encode.
count int The number of characters to encode.
return int
        public override int GetByteCount(char[] chars, int index, int count)
        {
            return count;
        }

Usage Example

示例#1
0
 public void GetByteCountTest()
 {
     ASCIIEncoding target = new ASCIIEncoding(); // TODO: Initialize to an appropriate value
     char[] chars = null; // TODO: Initialize to an appropriate value
     int index = 0; // TODO: Initialize to an appropriate value
     int count = 0; // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.GetByteCount(chars, index, count);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }