system\convert.cs (32)
122(RuntimeType)typeof(Byte),
725if (value > Byte.MaxValue) throw new OverflowException(Environment.GetResourceString("Overflow_Byte"));
732if (value < Byte.MinValue) throw new OverflowException(Environment.GetResourceString("Overflow_Byte"));
738if (value < Byte.MinValue || value > Byte.MaxValue) throw new OverflowException(Environment.GetResourceString("Overflow_Byte"));
745if (value > Byte.MaxValue) throw new OverflowException(Environment.GetResourceString("Overflow_Byte"));
751if (value < Byte.MinValue || value > Byte.MaxValue) throw new OverflowException(Environment.GetResourceString("Overflow_Byte"));
758if (value > Byte.MaxValue) throw new OverflowException(Environment.GetResourceString("Overflow_Byte"));
764if (value < Byte.MinValue || value > Byte.MaxValue) throw new OverflowException(Environment.GetResourceString("Overflow_Byte"));
771if (value > Byte.MaxValue) throw new OverflowException(Environment.GetResourceString("Overflow_Byte"));
791return Byte.Parse(value, CultureInfo.CurrentCulture);
797return Byte.Parse(value, NumberStyles.Integer, provider);
1983if (r < Byte.MinValue || r > Byte.MaxValue)
1999if (fromBase != 10 && r <= Byte.MaxValue)
2345public static Byte[] FromBase64String(String s) {
2371public static Byte[] FromBase64CharArray(Char[] inArray, Int32 offset, Int32 length) {
2420private static unsafe Byte[] FromBase64CharPtr(Char* inputPtr, Int32 inputLength) {
2445Byte[] decodedBytes = new Byte[resultLength];
2449fixed (Byte* decodedBytesPtr = decodedBytes)
2474private static unsafe Int32 FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength) {
2493Byte* destPtr = startDestPtr;
2497Byte* endDestPtr = destPtr + destLength;
2563*(destPtr) = (Byte) (currBlockCodes >> 16);
2564*(destPtr + 1) = (Byte) (currBlockCodes >> 8);
2565*(destPtr + 2) = (Byte) (currBlockCodes);
2596*(destPtr++) = (Byte) (currBlockCodes >> 16);
2597*(destPtr++) = (Byte) (currBlockCodes >> 8);
2626*(destPtr++) = (Byte) (currBlockCodes >> 16);
system\io\bufferedstream.cs (19)
72private Byte[] _buffer; // Shared read/write buffer. Alloc on first use.
182Byte[] shadowBuffer = new Byte[Math.Min(_bufferSize + _bufferSize, MaxShadowBufferSize)];
194_buffer = new Byte[_bufferSize];
466private Int32 ReadFromBuffer(Byte[] array, Int32 offset, Int32 count) {
486private Int32 ReadFromBuffer(Byte[] array, Int32 offset, Int32 count, out Exception error) {
500public override int Read([In, Out] Byte[] array, Int32 offset, Int32 count) {
566public override IAsyncResult BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state) {
628private IAsyncResult BeginReadFromUnderlyingStream(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state,
665public override Task<Int32> ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) {
731private async Task<Int32> ReadFromUnderlyingStreamAsync(Byte[] array, Int32 offset, Int32 count,
826private void WriteToBuffer(Byte[] array, ref Int32 offset, ref Int32 count) {
842private void WriteToBuffer(Byte[] array, ref Int32 offset, ref Int32 count, out Exception error) {
855public override void Write(Byte[] array, Int32 offset, Int32 count) {
995public override IAsyncResult BeginWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state) {
1053private IAsyncResult BeginWriteToUnderlyingStream(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state,
1077public override Task WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) {
1141private async Task WriteToUnderlyingStreamAsync(Byte[] array, Int32 offset, Int32 count,
1252public override void WriteByte(Byte value) {
system\io\stream.cs (8)
410public Task<int> ReadAsync(Byte[] buffer, int offset, int count)
417public virtual Task<int> ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
426private Task<Int32> BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count)
705public Task WriteAsync(Byte[] buffer, int offset, int count)
712public virtual Task WriteAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
722private Task BeginEndWriteAsync(Byte[] buffer, Int32 offset, Int32 count)
946public override Task<int> ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
967public override Task WriteAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
system\timezoneinfo.cs (9)
2353Byte[] regValue = dynamicKey.GetValue(first.ToString(CultureInfo.InvariantCulture), null, RegistryValueOptions.None) as Byte[];
2389regValue = dynamicKey.GetValue(i.ToString(CultureInfo.InvariantCulture), null, RegistryValueOptions.None) as Byte[];
2405regValue = dynamicKey.GetValue(last.ToString(CultureInfo.InvariantCulture), null, RegistryValueOptions.None) as Byte[];
2503Byte[] regValue = (Byte[])key.GetValue(c_timeZoneInfoValue, null, RegistryValueOptions.None) as Byte[];
2789Byte[] regValue = key.GetValue(c_timeZoneInfoValue, null, RegistryValueOptions.None) as Byte[];
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (4)
81return (Byte)result;
1343internal static void SetByte( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, Byte value ) {
1591case ExtendedClrTypeCode.Byte: SetByte_Unchecked( sink, setters, ordinal, (Byte) value ); break;
3280private static void SetByte_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, Byte value ) {
fx\src\data\System\Data\Odbc\Odbc32.cs (5)
786static internal readonly TypeMap _Image = new TypeMap(OdbcType.Image, DbType.Binary, typeof(Byte[]), ODBC32.SQL_TYPE.LONGVARBINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false);
797static private readonly TypeMap _Timestamp = new TypeMap(OdbcType.Timestamp, DbType.Binary, typeof(Byte[]), ODBC32.SQL_TYPE.BINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false);
798static private readonly TypeMap _TinyInt = new TypeMap(OdbcType.TinyInt, DbType.Byte, typeof(Byte), ODBC32.SQL_TYPE.TINYINT, ODBC32.SQL_C.UTINYINT, ODBC32.SQL_C.UTINYINT, 1, 3, true);
799static private readonly TypeMap _VarBinary = new TypeMap(OdbcType.VarBinary, DbType.Binary, typeof(Byte[]), ODBC32.SQL_TYPE.VARBINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false);
897if (dataType == typeof(System.Byte[])) {
fx\src\data\System\Data\OleDb\OLEDB_Enum.cs (9)
158static private readonly NativeDBType D_Binary = new NativeDBType(0xff, -1, true, false, OleDbType.Binary, NativeDBType.BYTES, S_BINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 0
177static private readonly NativeDBType D_LongVarBinary = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarBinary, NativeDBType.BYTES, S_LONGVARBINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 19
184static private readonly NativeDBType D_UnsignedTinyInt = new NativeDBType( 3, 1, true, false, OleDbType.UnsignedTinyInt, NativeDBType.UI1, S_UI1, typeof(System.Byte), NativeDBType.UI1, DbType.Byte ); // 25 - byte7
188static private readonly NativeDBType D_VarBinary = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.BYTES, S_VARBINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 29
198static private readonly NativeDBType D_Udt = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.UDT, S_BINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary ); // 39 - (unicode pointer)
201static internal readonly Byte MaximumDecimalPrecision = D_Decimal.maxpre;
215internal readonly Byte maxpre; // maxium precision for numeric types // $
221private NativeDBType(Byte maxpre, int fixlen, bool isfixed, bool islong, OleDbType enumOleDbType, short dbType, string dbstring, Type dataType, short wType, DbType enumDbType) {
317else if (value is System.Byte[]) {
fx\src\data\System\Data\SqlClient\SqlEnums.cs (9)
288if (dataType == typeof(System.Byte[])) {
500else if (comVal is System.Byte[])
718(255, 255, -1, false, false, false, TdsEnums.SQLBIGBINARY, TdsEnums.SQLBIGBINARY, MetaTypeName.BINARY, typeof(System.Byte[]), typeof(SqlBinary), SqlDbType.Binary, DbType.Binary, 2);
722(255, 255, -1, false, false, false, TdsEnums.SQLBIGBINARY, TdsEnums.SQLBIGBINARY, MetaTypeName.TIMESTAMP, typeof(System.Byte[]), typeof(SqlBinary), SqlDbType.Timestamp, DbType.Binary, 2);
725(255, 255, -1, false, false, false, TdsEnums.SQLBIGVARBINARY, TdsEnums.SQLBIGVARBINARY, MetaTypeName.VARBINARY, typeof(System.Byte[]), typeof(SqlBinary), SqlDbType.VarBinary, DbType.Binary, 2);
728(255, 255, -1, false, true, true, TdsEnums.SQLBIGVARBINARY, TdsEnums.SQLBIGVARBINARY, MetaTypeName.VARBINARY, typeof(System.Byte[]), typeof(SqlBinary), SqlDbType.VarBinary, DbType.Binary, 2);
734(255, 255, -1, false, false, false, TdsEnums.SQLVARBINARY, TdsEnums.SQLBIGBINARY, ADP.StrEmpty, typeof(System.Byte[]), typeof(SqlBinary), TdsEnums.SmallVarBinary, DbType.Binary, 2);
737(255, 255, -1, false, true, false, TdsEnums.SQLIMAGE, TdsEnums.SQLIMAGE, MetaTypeName.IMAGE, typeof(System.Byte[]), typeof(SqlBinary), SqlDbType.Image, DbType.Binary, 0);
743(3, 255, 1, true, false, false, TdsEnums.SQLINT1, TdsEnums.SQLINTN, MetaTypeName.TINYINT, typeof(System.Byte), typeof(SqlByte), SqlDbType.TinyInt, DbType.Byte, 0);