IndexOfByte() статический приватный Метод

static private IndexOfByte ( byte src, byte value, int index, int count ) : int
src byte
value byte
index int
count int
Результат int
Пример #1
0
        private static unsafe string Ctor(sbyte *value)
        {
            byte *pb = (byte *)value;

            if (pb == null)
            {
                return(string.Empty);  // Compatibility
            }
            int numBytes = Buffer.IndexOfByte(pb, 0, 0, int.MaxValue);

            if (numBytes < 0)                                               // This check covers the "-1 = not-found" case and "negative length" case (downstream code assumes length is non-negative).
            {
                throw new ArgumentException(SR.Arg_ExpectedNulTermination); // We'll likely have AV'd before we get to this point, but just in case...
            }
            return(CreateStringForSByteConstructor(pb, numBytes));
        }