249 references to BitConverter
mscorlib (26)
microsoft\win32\win32native.cs (19)
346Bias = BitConverter.ToInt32(bytes, 0); 347StandardBias = BitConverter.ToInt32(bytes, 4); 348DaylightBias = BitConverter.ToInt32(bytes, 8); 350StandardDate.Year = BitConverter.ToInt16(bytes, 12); 351StandardDate.Month = BitConverter.ToInt16(bytes, 14); 352StandardDate.DayOfWeek = BitConverter.ToInt16(bytes, 16); 353StandardDate.Day = BitConverter.ToInt16(bytes, 18); 354StandardDate.Hour = BitConverter.ToInt16(bytes, 20); 355StandardDate.Minute = BitConverter.ToInt16(bytes, 22); 356StandardDate.Second = BitConverter.ToInt16(bytes, 24); 357StandardDate.Milliseconds = BitConverter.ToInt16(bytes, 26); 359DaylightDate.Year = BitConverter.ToInt16(bytes, 28); 360DaylightDate.Month = BitConverter.ToInt16(bytes, 30); 361DaylightDate.DayOfWeek = BitConverter.ToInt16(bytes, 32); 362DaylightDate.Day = BitConverter.ToInt16(bytes, 34); 363DaylightDate.Hour = BitConverter.ToInt16(bytes, 36); 364DaylightDate.Minute = BitConverter.ToInt16(bytes, 38); 365DaylightDate.Second = BitConverter.ToInt16(bytes, 40); 366DaylightDate.Milliseconds = BitConverter.ToInt16(bytes, 42);
system\collections\hashtable.cs (1)
1834ret = BitConverter.ToInt64(data, currentIndex);
system\double.cs (1)
54internal static double NegativeZero = BitConverter.Int64BitsToDouble(unchecked((long)0x8000000000000000));
system\globalization\sortversion.cs (1)
33byte[] b = BitConverter.GetBytes(effectiveId);
system\reflection\emit\dynamicilgenerator.cs (1)
869EHCount = (BitConverter.ToInt32(size, 0) - 4) / 24;
system\runtime\serialization\formatters\binary\binarycommonclasses.cs (1)
464throw new SerializationException(Environment.GetResourceString("Serialization_InvalidFormat", BitConverter.ToString(headerBytes)));
system\security\cryptography\capinative.cs (2)
356return rawProperty.Length == sizeof(int) ? BitConverter.ToInt32(rawProperty, 0) : 0; 393return rawProperty.Length == sizeof(int) ? BitConverter.ToInt32(rawProperty, 0) : 0;
PresentationFramework (1)
src\Framework\System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
1827value = BitConverter.GetBytes(valueId);
System (10)
net\System\Net\_DigestClient.cs (5)
1180BitConverter.GetBytes(initiatorType).CopyTo(formattedData, 0); 1181BitConverter.GetBytes(initiatorLength).CopyTo(formattedData, SizeOfInt); 1191BitConverter.GetBytes(acceptorType).CopyTo(formattedData, offset); 1192BitConverter.GetBytes(acceptorLength).CopyTo(formattedData, offset + SizeOfInt); 1202BitConverter.GetBytes(applicationDataLength).CopyTo(formattedData, offset);
net\System\Net\_SSPIWrapper.cs (1)
358var buffer = BitConverter.GetBytes(shutdownToken);
net\System\Net\HttpWebRequest.cs (1)
6428ControlChannelTriggerStatus status = (ControlChannelTriggerStatus)BitConverter.ToInt32(outputData, 0);
security\system\security\cryptography\bigint.cs (2)
273byte[] bytes = BitConverter.GetBytes(carry); 298byte[] bytes = BitConverter.GetBytes(carry);
security\system\security\cryptography\x509\x509extension.cs (1)
141m_keyUsages = BitConverter.ToUInt32(keyUsage, 0);
System.Activities (1)
System\Activities\Expressions\AssemblyNameEqualityComparer.cs (1)
123hashcode ^= BitConverter.ToUInt64(objArray, 0).GetHashCode();
System.Core (11)
System\Security\Cryptography\BCryptNative.cs (1)
485return BitConverter.ToInt32(GetProperty(algorithm, property), 0);
System\Security\Cryptography\CapiNative.cs (2)
585int keyLength = BitConverter.ToInt32(keyBlob, Marshal.SizeOf(typeof(BLOBHEADER))); 780SetKeyParameter(key, parameter, BitConverter.GetBytes(value));
System\Security\Cryptography\CngKey.cs (1)
104BitConverter.GetBytes((int)value),
System\Security\Cryptography\NCryptNative.cs (5)
963Buffer.BlockCopy(BitConverter.GetBytes((int)algorithmMagic), 0, blob, 0, sizeof(int)); 964Buffer.BlockCopy(BitConverter.GetBytes(xBytes.Length), 0, blob, sizeof(int), sizeof(int)); 1407return BitConverter.ToInt32(valueBytes, 0); 1681SetProperty(ncryptObject, propertyName, BitConverter.GetBytes(value), propertyOptions); 1874int parameterSize = BitConverter.ToInt32(blob, sizeof(int));
System\Security\Cryptography\RsaCng.cs (2)
100BitConverter.GetBytes(KeySize), 244int magic = BitConverter.ToInt32(tempMagic, 0);
System.Data (83)
fx\src\data\System\Data\Common\ObjectStorage.cs (10)
218values[recordNo] = BitConverter.GetBytes((Boolean)value); 221values[recordNo] = BitConverter.GetBytes((Char)value); 224values[recordNo] = BitConverter.GetBytes((Int16)value); 227values[recordNo] = BitConverter.GetBytes((Int32)value); 230values[recordNo] = BitConverter.GetBytes((Int64)value); 233values[recordNo] = BitConverter.GetBytes((UInt16)value); 236values[recordNo] = BitConverter.GetBytes((UInt32)value); 239values[recordNo] = BitConverter.GetBytes((UInt64)value); 242values[recordNo] = BitConverter.GetBytes((Single)value); 245values[recordNo] = BitConverter.GetBytes((Double)value);
fx\src\data\System\Data\Odbc\OdbcConnection.cs (4)
385retval = BitConverter.ToInt32(buffer, 0); 412resultValue = BitConverter.ToInt16(buffer, 0); 419resultValue = BitConverter.ToInt32(buffer, 0); 426return BitConverter.ToInt32(buffer, 0);
fx\src\data\System\Data\ProviderBase\DbBuffer.cs (6)
192return BitConverter.Int64BitsToDouble(value); 428WriteInt64(offset, BitConverter.DoubleToInt64Bits(value)); 656buffer[0] = BitConverter.ToInt32(bits, 4); // low 657buffer[1] = BitConverter.ToInt32(bits, 8); // mid 658buffer[2] = BitConverter.ToInt32(bits, 12); // high 659if (0 != BitConverter.ToInt32(bits, 16)) {
fx\src\data\System\Data\Sql\sqlnorm.cs (16)
349byte[] b = BitConverter.GetBytes((short) GetValue(fi, obj)); 364SetValue(fi, recvr, BitConverter.ToInt16(b, 0)); 372byte[] b = BitConverter.GetBytes((ushort) GetValue(fi, obj)); 385SetValue(fi, recvr, BitConverter.ToUInt16(b, 0)); 393byte[] b = BitConverter.GetBytes((int) GetValue(fi, obj)); 410SetValue(fi, recvr, BitConverter.ToInt32(b, 0)); 418byte[] b = BitConverter.GetBytes((uint) GetValue(fi, obj)); 431SetValue(fi, recvr, BitConverter.ToUInt32(b, 0)); 439byte[] b = BitConverter.GetBytes((long) GetValue(fi, obj)); 454SetValue(fi, recvr, BitConverter.ToInt64(b, 0)); 462byte[] b = BitConverter.GetBytes((ulong) GetValue(fi, obj)); 477SetValue(fi, recvr, BitConverter.ToUInt64(b, 0)); 486byte[] b = BitConverter.GetBytes(f); 522SetValue(fi, recvr, BitConverter.ToSingle(b, 0)); 531byte[] b = BitConverter.GetBytes(d); 569SetValue(fi, recvr, BitConverter.ToDouble(b, 0));
fx\src\data\System\Data\SqlClient\SqlColumnEncryptionCertificateStoreProvider.cs (4)
116Int16 keyPathLength = BitConverter.ToInt16(encryptedColumnEncryptionKey, currentIndex); 120int cipherTextLength = BitConverter.ToInt16(encryptedColumnEncryptionKey, currentIndex); 210byte[] keyPathLength = BitConverter.GetBytes((Int16)masterKeyPathBytes.Length); 214byte[] cipherTextLength = BitConverter.GetBytes((Int16)cipherText.Length);
fx\src\data\System\Data\SqlClient\SqlColumnEncryptionCngProvider.cs (4)
96UInt16 keyPathLength = BitConverter.ToUInt16(encryptedColumnEncryptionKey, currentIndex); 100UInt16 cipherTextLength = BitConverter.ToUInt16(encryptedColumnEncryptionKey, currentIndex); 190byte[] keyPathLength = BitConverter.GetBytes((Int16)masterKeyPathBytes.Length); 194byte[] cipherTextLength = BitConverter.GetBytes((Int16)cipherText.Length);
fx\src\data\System\Data\SqlClient\SqlColumnEncryptionCspProvider.cs (4)
102UInt16 keyPathLength = BitConverter.ToUInt16(encryptedColumnEncryptionKey, currentIndex); 106UInt16 cipherTextLength = BitConverter.ToUInt16(encryptedColumnEncryptionKey, currentIndex); 196byte[] keyPathLength = BitConverter.GetBytes((Int16)masterKeyPathBytes.Length); 200byte[] cipherTextLength = BitConverter.GetBytes((Int16)cipherText.Length);
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (1)
2513len = BitConverter.ToInt32(data, i); i += 4;
fx\src\data\System\Data\SqlClient\SqlSecurityUtility.cs (1)
181return BitConverter.ToString(buff, startIndex, count);
fx\src\data\System\Data\SqlClient\TdsParser.cs (16)
1610return BitConverter.GetBytes(v); 1614byte[] bytes = BitConverter.GetBytes(v); 1719return BitConverter.GetBytes(v); 1723byte[] bytes = BitConverter.GetBytes(v); 3162Bid.Trace("<sc.TdsParser.TryProcessFedAuthInfo> Read rest of FEDAUTHINFO token stream: %ls\n", BitConverter.ToString(tokenData, 0, totalRead)); 3184uint dataLen = BitConverter.ToUInt32(tokenData, checked((int)(currentOptionOffset + 1))); 3185uint dataOffset = BitConverter.ToUInt32(tokenData, checked((int)(currentOptionOffset + 5))); 5069longValue = BitConverter.ToInt64(unencryptedBytes, 0); 5103singleValue = BitConverter.ToSingle(unencryptedBytes, 0); 5113doubleValue = BitConverter.ToDouble(unencryptedBytes, 0); 5129mid = BitConverter.ToInt32(unencryptedBytes, 0); 5130lo = BitConverter.ToUInt32(unencryptedBytes, 4); 5163daypart = BitConverter.ToInt32(unencryptedBytes, 0); 5164timepart = BitConverter.ToUInt32(unencryptedBytes, 4); 5208bits[i] = BitConverter.ToInt32(unencryptedBytes, index); 8391byte[] lenBytes = BitConverter.GetBytes((Int64)size);
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (12)
1121_outBytesUsed == (_outputHeaderLen + BitConverter.ToInt32(_outBuff, _outputHeaderLen)) && 1369value = BitConverter.ToInt32(_bTmp, 0); 1376value = BitConverter.ToInt32(_inBuff, _inBytesUsed); 1411value = BitConverter.ToInt64(_bTmp, 0); 1419value = BitConverter.ToInt64(_inBuff, _inBytesUsed); 1487value = BitConverter.ToUInt32(_bTmp, 0); 1495value = BitConverter.ToUInt32(_inBuff, _inBytesUsed); 1518value = BitConverter.ToSingle(_bTmp, 0); 1525value = BitConverter.ToSingle(_inBuff, _inBytesUsed); 1548value = BitConverter.ToDouble(_bTmp, 0); 1555value = BitConverter.ToDouble(_inBuff, _inBytesUsed); 2816&& _outBytesUsed == (_outputHeaderLen + BitConverter.ToInt32(_outBuff, _outputHeaderLen))
fx\src\data\System\Data\SqlClient\TdsValueSetter.cs (5)
519_stateObj.WriteByteArray(BitConverter.GetBytes(time), (int)_metaData.MaxLength - 3, 0); 521_stateObj.WriteByteArray(BitConverter.GetBytes(days), 3, 0); 562_stateObj.WriteByteArray(BitConverter.GetBytes(time), length, 0); 589_stateObj.WriteByteArray(BitConverter.GetBytes(time), length - 5, 0); // time 590_stateObj.WriteByteArray(BitConverter.GetBytes(days), 3, 0); // date
System.Data.SqlXml (10)
System\Xml\Xsl\XPathConvert.cs (10)
26return (uint)(BitConverter.DoubleToInt64Bits(dbl) >> 32); 30return (uint)BitConverter.DoubleToInt64Bits(dbl); 570return BitConverter.Int64BitsToDouble((long)dblHi << 32 | dblLo); 959dblT = BitConverter.Int64BitsToDouble(0x4FF00000L << 32); 969dblT = BitConverter.Int64BitsToDouble((long)dblHi << 32 | DblLo(dblT)); 978dblT = BitConverter.Int64BitsToDouble((long)dblHi << 32 | dblLo); 2446dbl = BitConverter.Int64BitsToDouble(BitConverter.DoubleToInt64Bits(dbl) - 1); 2465dbl = BitConverter.Int64BitsToDouble(BitConverter.DoubleToInt64Bits(dbl) + 1);
System.Drawing (2)
commonui\System\Drawing\Icon.cs (2)
1119int iconSignature1 = BitConverter.ToInt32(iconData, bestImageOffset); 1120int iconSignature2 = BitConverter.ToInt32(iconData, bestImageOffset + 4);
System.IdentityModel (2)
System\IdentityModel\RsaSignatureCookieTransform.cs (2)
164Int32 signatureLength = BitConverter.ToInt32(encoded, currentIndex); 287byte[] signatureLength = BitConverter.GetBytes(signature.Length);
System.IO.Log (6)
System\IO\Log\FileLogRecordHeader.cs (2)
76BitConverter.ToUInt64(this.bits, PreviousLsnOffsetHigh)); 84get { return new SequenceNumber(BitConverter.ToUInt64(this.bits, NextUndoLsnOffsetHigh)); }
System\IO\Log\LogLogRecordHeader.cs (2)
61flags = (LogLogRecordFlags)BitConverter.ToUInt16(bits, FlagsOffset); 68flags = (LogLogRecordFlags)BitConverter.ToUInt16(bits, FlagsOffset);
System\IO\Log\SequenceNumber.cs (2)
29this.sequenceNumberHigh = BitConverter.ToUInt64(sequenceNumber, 0); 32this.sequenceNumberLow = BitConverter.ToUInt64(sequenceNumber, 8);
System.Messaging (23)
System\Messaging\ActiveXMessageFormatter.cs (21)
172return Decimal.FromOACurrency(BitConverter.ToInt64(newBytes, 0)); 177return new DateTime(BitConverter.ToInt64(newBytes, 0)); 188return BitConverter.ToInt16(bytes, 0); 193return BitConverter.ToUInt16(bytes, 0); 198return BitConverter.ToInt32(bytes, 0); 203return BitConverter.ToUInt32(bytes, 0); 208return BitConverter.ToInt64(bytes, 0); 213return BitConverter.ToUInt64(bytes, 0); 218return BitConverter.ToSingle(bytes, 0); 223return BitConverter.ToDouble(bytes, 0); 312byte[] bytes = BitConverter.GetBytes((Char)obj); 319byte[] bytes = BitConverter.GetBytes(Decimal.ToOACurrency((Decimal)obj)); 326byte[] bytes = BitConverter.GetBytes(((DateTime)obj).Ticks); 333byte[] bytes = BitConverter.GetBytes((Double)obj); 340byte[] bytes = BitConverter.GetBytes((short)obj); 347byte[] bytes = BitConverter.GetBytes((UInt16)obj); 354byte[] bytes = BitConverter.GetBytes((int)obj); 361byte[] bytes = BitConverter.GetBytes((UInt32)obj); 368byte[] bytes = BitConverter.GetBytes((Int64)obj); 375byte[] bytes = BitConverter.GetBytes((UInt64)obj); 382byte[] bytes = BitConverter.GetBytes((float)obj);
System\Messaging\Message.cs (2)
2352int id = BitConverter.ToInt32(bytes, GenericIdSize); 2393Array.Copy(BitConverter.GetBytes(integerId), 0, bytes, GenericIdSize, 4);
System.Runtime.Serialization (6)
System\Xml\XmlBinaryReader.cs (6)
1297if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int16TextWithEndElement) && BitConverter.IsLittleEndian) 1304if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int16TextWithEndElement) && BitConverter.IsLittleEndian) 1327if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int32TextWithEndElement) && BitConverter.IsLittleEndian) 1334if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int32TextWithEndElement) && BitConverter.IsLittleEndian) 1357if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int64TextWithEndElement) && BitConverter.IsLittleEndian) 1364if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int64TextWithEndElement) && BitConverter.IsLittleEndian)
System.Security (2)
system\security\cryptography\bigint.cs (2)
276byte[] bytes = BitConverter.GetBytes(carry); 301byte[] bytes = BitConverter.GetBytes(carry);
System.ServiceModel (28)
System\ServiceModel\Channels\NativeMsmqMessage.cs (2)
521int id = BitConverter.ToInt32(messageId, guidSize); 552Array.Copy(BitConverter.GetBytes(integerId), 0, bytes, guidSize, 4);
System\ServiceModel\Channels\PeerIPHelper.cs (3)
314if (BitConverter.ToUInt16(bytes, 0) == Six2FourPrefix) 316else if (BitConverter.ToUInt32(bytes, 0) == TeredoPrefix) 318else if (BitConverter.ToUInt32(bytes, 8) == IsatapIdentifier)
System\ServiceModel\MsmqIntegration\ActiveXSerializer.cs (21)
132return Decimal.FromOACurrency(BitConverter.ToInt64(bytes, 0)); 142return new DateTime(BitConverter.ToInt64(bytes, 0)); 162return BitConverter.ToInt16(bytes, 0); 171return BitConverter.ToUInt16(bytes, 0); 180return BitConverter.ToInt32(bytes, 0); 189return BitConverter.ToUInt32(bytes, 0); 198return BitConverter.ToInt64(bytes, 0); 207return BitConverter.ToUInt64(bytes, 0); 216return BitConverter.ToSingle(bytes, 0); 225return BitConverter.ToDouble(bytes, 0); 305byte[] bytes = BitConverter.GetBytes((Char)obj); 311byte[] bytes = BitConverter.GetBytes(Decimal.ToOACurrency((Decimal)obj)); 317byte[] bytes = BitConverter.GetBytes(((DateTime)obj).Ticks); 323byte[] bytes = BitConverter.GetBytes((Double)obj); 335byte[] bytes = BitConverter.GetBytes((short)obj); 341byte[] bytes = BitConverter.GetBytes((UInt16)obj); 347byte[] bytes = BitConverter.GetBytes((int)obj); 354byte[] bytes = BitConverter.GetBytes((UInt32)obj); 361byte[] bytes = BitConverter.GetBytes((Int64)obj); 368byte[] bytes = BitConverter.GetBytes((UInt64)obj); 375byte[] bytes = BitConverter.GetBytes((float)obj);
System\ServiceModel\Transactions\WsatProxy.cs (2)
421byte[] isoLevelBytes = BitConverter.GetBytes((int)ConvertIsolationLevel(isoLevel)); 425byte[] isoFlagsBytes = BitConverter.GetBytes((int)isoFlags);
System.Web (8)
Hosting\ISAPIWorkerRequest.cs (2)
2924byte[] offsetBytes = BitConverter.GetBytes(offset); 2925byte[] lengthBytes = BitConverter.GetBytes(length);
HttpRuntime.cs (1)
3367bufin = BitConverter.GetBytes(UnsafeNativeMethods.RESTRICT_BIN);
Security\AnonymousIdentificationModule.cs (4)
344byte [] bufIdLen = BitConverter.GetBytes(bufId.Length); 345byte [] bufDate = BitConverter.GetBytes(data.ExpireDate.ToFileTimeUtc()); 364DateTime expireDate = DateTime.FromFileTimeUtc(BitConverter.ToInt64(bBlob, 0)); 367int len = BitConverter.ToInt32(bBlob, 8);
UI\EventValidationStore.cs (1)
159return BitConverter.ToInt32(obj, 0);
System.Xml (2)
System\Xml\XmlEncoding.cs (2)
56if ( bigEndian == BitConverter.IsLittleEndian ) { 108if ( bigEndian == BitConverter.IsLittleEndian ) {
WindowsBase (22)
Base\MS\Internal\IO\Packaging\CompoundFile\CompoundFileDeflateTransform.cs (3)
399uint token = BitConverter.ToUInt32(_headerBuf, _ulongSize * 0); 406uncompressedSize = (int)BitConverter.ToUInt32(_headerBuf, _ulongSize * 1); 407compressedSize = (int)BitConverter.ToUInt32(_headerBuf, _ulongSize * 2);
Base\MS\Internal\IO\Packaging\CompoundFile\RightsManagementEncryptedStream.cs (3)
325Debug.Assert(BitConverter.IsLittleEndian); 369_streamOnDiskLength = (long)BitConverter.ToUInt64(prefixData, 0); 668byte[] prefixData = BitConverter.GetBytes((ulong)_streamCachedLength);
Base\MS\Internal\IO\Zip\ZipIOBlockManager.cs (6)
567byte[] tempBuffer = BitConverter.GetBytes(value); 577byte[] tempBuffer = BitConverter.GetBytes(value); 587byte[] tempBuffer = BitConverter.GetBytes(value); 597byte[] tempBuffer = BitConverter.GetBytes(value); 607byte[] tempBuffer = BitConverter.GetBytes(value); 617byte[] tempBuffer = BitConverter.GetBytes(value);
Base\MS\Internal\IO\Zip\ZipIOExtraFieldPaddingElement.cs (1)
87if (BitConverter.ToUInt16(sniffiedBytes, 0) != _signature)
Base\MS\Internal\Security\RightsManagement\NativeRightsManagementAPIsStructures.cs (8)
81Year = BitConverter.ToUInt16(dataBuffer,0); 82Month = BitConverter.ToUInt16(dataBuffer,2); 83DayOfWeek = BitConverter.ToUInt16(dataBuffer,4); 84Day = BitConverter.ToUInt16(dataBuffer,6); 85Hour = BitConverter.ToUInt16(dataBuffer,8); 86Minute = BitConverter.ToUInt16(dataBuffer,10); 87Second = BitConverter.ToUInt16(dataBuffer,12); 88Milliseconds = BitConverter.ToUInt16(dataBuffer,14);
Base\System\Security\RightsManagement\CryptoProvider.cs (1)
452return BitConverter.ToInt32(dataBuffer,0);
WsatConfig (3)
Configuration\ClusterRegistryConfigurationProvider.cs (3)
172return (uint)BitConverter.ToUInt32(buffer, 0); 177byte[] buffer = BitConverter.GetBytes(value); 274index < buffer.Length - 1 && BitConverter.ToChar(buffer, index) != 0;
WsatUI (3)
Configuration\ClusterRegistryConfigurationProvider.cs (3)
172return (uint)BitConverter.ToUInt32(buffer, 0); 177byte[] buffer = BitConverter.GetBytes(value); 274index < buffer.Length - 1 && BitConverter.ToChar(buffer, index) != 0;