1198 references to BitConverter
aspire (1)
csc (4)
dotnet (20)
dotnet-sourcelink (1)
dotnet-svcutil-lib (8)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryReader.cs (6)
1271if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int16TextWithEndElement) && BitConverter.IsLittleEndian)
1278if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int16TextWithEndElement) && BitConverter.IsLittleEndian)
1303if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int32TextWithEndElement) && BitConverter.IsLittleEndian)
1310if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int32TextWithEndElement) && BitConverter.IsLittleEndian)
1335if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int64TextWithEndElement) && BitConverter.IsLittleEndian)
1342if (IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int64TextWithEndElement) && BitConverter.IsLittleEndian)
GenerateDocumentationAndConfigFiles (17)
ILAssembler (17)
GrammarVisitor.cs (17)
2508SerializationTypeCode.Char => valueBytes.Length >= 2 ? BitConverter.ToChar(valueBytes) : '\0',
2511SerializationTypeCode.Int16 => valueBytes.Length >= 2 ? BitConverter.ToInt16(valueBytes) : (short)0,
2512SerializationTypeCode.UInt16 => valueBytes.Length >= 2 ? BitConverter.ToUInt16(valueBytes) : (ushort)0,
2513SerializationTypeCode.Int32 => valueBytes.Length >= 4 ? BitConverter.ToInt32(valueBytes) : 0,
2514SerializationTypeCode.UInt32 => valueBytes.Length >= 4 ? BitConverter.ToUInt32(valueBytes) : 0u,
2515SerializationTypeCode.Int64 => valueBytes.Length >= 8 ? BitConverter.ToInt64(valueBytes) : 0L,
2516SerializationTypeCode.UInt64 => valueBytes.Length >= 8 ? BitConverter.ToUInt64(valueBytes) : 0uL,
2517SerializationTypeCode.Single => valueBytes.Length >= 4 ? BitConverter.ToSingle(valueBytes) : 0f,
2518SerializationTypeCode.Double => valueBytes.Length >= 8 ? BitConverter.ToDouble(valueBytes) : 0d,
2666builder.WriteSingle(BitConverter.Int32BitsToSingle(value));
2679builder.WriteDouble(BitConverter.Int64BitsToDouble(value));
2754return new(BitConverter.Int32BitsToSingle(value));
2759return new(BitConverter.Int64BitsToDouble(value));
3046value = BitConverter.Int64BitsToDouble(intValue);
3053value = BitConverter.ToDouble(bytes, 0);
3057value = BitConverter.ToSingle(bytes, 0);
3103if (!BitConverter.IsLittleEndian)
ILCompiler.Compiler (13)
ILCompiler.Diagnostics (4)
ILCompiler.MetadataTransform (4)
ILCompiler.ReadyToRun (6)
JitInterface\CorInfoImpl.ReadyToRun.cs (6)
1577Array.Copy(BitConverter.GetBytes((uint)flags), 0, ehInfoData, clauseOffset + (int)EHInfoFields.Flags * sizeof(uint), sizeof(uint));
1578Array.Copy(BitConverter.GetBytes((uint)clause.TryOffset), 0, ehInfoData, clauseOffset + (int)EHInfoFields.TryOffset * sizeof(uint), sizeof(uint));
1580Array.Copy(BitConverter.GetBytes((uint)(clause.TryLength)), 0, ehInfoData, clauseOffset + (int)EHInfoFields.TryEnd * sizeof(uint), sizeof(uint));
1581Array.Copy(BitConverter.GetBytes((uint)clause.HandlerOffset), 0, ehInfoData, clauseOffset + (int)EHInfoFields.HandlerOffset * sizeof(uint), sizeof(uint));
1582Array.Copy(BitConverter.GetBytes((uint)(clause.HandlerLength)), 0, ehInfoData, clauseOffset + (int)EHInfoFields.HandlerEnd * sizeof(uint), sizeof(uint));
1583Array.Copy(BitConverter.GetBytes(classTokenOrOffset), 0, ehInfoData, clauseOffset + (int)EHInfoFields.ClassTokenOrOffset * sizeof(uint), sizeof(uint));
ILCompiler.RyuJit (2)
Microsoft.AspNetCore.Antiforgery (1)
Microsoft.AspNetCore.App.CodeFixes (1)
Microsoft.AspNetCore.Components.Server (3)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Microsoft.AspNetCore.Razor.Utilities.Shared (13)
Microsoft.AspNetCore.Server.Kestrel.Core (7)
Microsoft.Build.Framework (6)
Microsoft.Build.Tasks.CodeAnalysis (4)
Microsoft.CodeAnalysis (30)
Microsoft.CodeAnalysis.Analyzers (9)
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
Microsoft.CodeAnalysis.CodeStyle (8)
Microsoft.CodeAnalysis.CSharp (6)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.NetAnalyzers (3)
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
Microsoft.CodeAnalysis.Workspaces (21)
Microsoft.Data.Analysis.Tests (1)
Microsoft.Deployment.DotNet.Releases (1)
Microsoft.Diagnostics.DataContractReader.Contracts (2)
Microsoft.Diagnostics.DataContractReader.Legacy (2)
Microsoft.Diagnostics.NETCore.Client (5)
Microsoft.DotNet.Arcade.Sdk (2)
Microsoft.DotNet.Build.Tasks.Installers (1)
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Microsoft.DotNet.Build.Tasks.Workloads (12)
Utils.cs (12)
136int timeLow = IPAddress.HostToNetworkOrder(BitConverter.ToInt32(namespaceBytes, 0));
138short timeMid = IPAddress.HostToNetworkOrder(BitConverter.ToInt16(namespaceBytes, 4));
140short timeHiVersion = IPAddress.HostToNetworkOrder(BitConverter.ToInt16(namespaceBytes, 6));
146Buffer.BlockCopy(BitConverter.GetBytes(timeLow), 0, hashBuffer, 0, 4);
147Buffer.BlockCopy(BitConverter.GetBytes(timeMid), 0, hashBuffer, 4, 2);
148Buffer.BlockCopy(BitConverter.GetBytes(timeHiVersion), 0, hashBuffer, 6, 2);
161timeLow = IPAddress.NetworkToHostOrder(BitConverter.ToInt32(hash, 0));
162Buffer.BlockCopy(BitConverter.GetBytes(timeLow), 0, hash, 0, 4);
165timeMid = IPAddress.NetworkToHostOrder(BitConverter.ToInt16(hash, 4));
166Buffer.BlockCopy(BitConverter.GetBytes(timeMid), 0, hash, 4, 2);
169timeHiVersion = IPAddress.NetworkToHostOrder(BitConverter.ToInt16(hash, 6));
173Buffer.BlockCopy(BitConverter.GetBytes(timeHiVersion), 0, hash, 6, 2);
Microsoft.DotNet.StrongName (3)
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Identity.Core (1)
Microsoft.Extensions.Validation.ValidationsGenerator (1)
Microsoft.Maui (1)
Microsoft.Maui.Controls.SourceGen (1)
Microsoft.ML.CpuMath (1)
Microsoft.ML.FastTree (8)
Microsoft.ML.Parquet (2)
Microsoft.ML.Tokenizers (5)
Microsoft.ML.Tokenizers.Tests (6)
Microsoft.ML.Vision (4)
Microsoft.NET.Build.Tasks (3)
Microsoft.NET.HostModel (12)
Microsoft.NET.Sdk.Razor.Tasks (4)
Microsoft.NET.StringTools (2)
Microsoft.Private.Windows.Core (2)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (3)
Microsoft.TestPlatform.CoreUtilities (2)
Microsoft.VisualBasic.Core (11)
Microsoft.Win32.Registry (2)
Mono.Cecil (10)
Mono.Cecil.Pdb (2)
mscorlib (1)
netstandard (1)
NuGet.Packaging (13)
NuGet.ProjectModel (1)
PresentationFramework (2)
RepoTasks (12)
Uuid.cs (12)
28int timeLow = IPAddress.HostToNetworkOrder(BitConverter.ToInt32(namespaceBytes, 0));
30short timeMid = IPAddress.HostToNetworkOrder(BitConverter.ToInt16(namespaceBytes, 4));
32short timeHiVersion = IPAddress.HostToNetworkOrder(BitConverter.ToInt16(namespaceBytes, 6));
38Buffer.BlockCopy(BitConverter.GetBytes(timeLow), 0, hashBuffer, 0, 4);
39Buffer.BlockCopy(BitConverter.GetBytes(timeMid), 0, hashBuffer, 4, 2);
40Buffer.BlockCopy(BitConverter.GetBytes(timeHiVersion), 0, hashBuffer, 6, 2);
53timeLow = IPAddress.NetworkToHostOrder(BitConverter.ToInt32(hash, 0));
54Buffer.BlockCopy(BitConverter.GetBytes(timeLow), 0, hash, 0, 4);
57timeMid = IPAddress.NetworkToHostOrder(BitConverter.ToInt16(hash, 4));
58Buffer.BlockCopy(BitConverter.GetBytes(timeMid), 0, hash, 4, 2);
61timeHiVersion = IPAddress.NetworkToHostOrder(BitConverter.ToInt16(hash, 6));
65Buffer.BlockCopy(BitConverter.GetBytes(timeHiVersion), 0, hash, 6, 2);
Roslyn.Diagnostics.Analyzers (9)
rzc (4)
System.Data.Common (10)
System.Data.Odbc (14)
System\Data\Odbc\OdbcConnection.cs (6)
399value = (BitConverter.IsLittleEndian ? Encoding.Unicode : Encoding.BigEndianUnicode).GetString(buffer, 0, Math.Min(cbActual, buffer.Length));
425retval = BitConverter.ToInt32(buffer, 0);
458resultValue = BitConverter.ToInt16(buffer, 0);
466resultValue = BitConverter.ToInt32(buffer, 0);
474return BitConverter.ToInt32(buffer, 0);
501value = (BitConverter.IsLittleEndian ? Encoding.Unicode : Encoding.BigEndianUnicode).GetString(buffer, 0, Math.Min(cbActual, buffer.Length));
System.Data.OleDb (8)
System.Diagnostics.DiagnosticSource (6)
System.Diagnostics.PerformanceCounter (2)
System.Drawing.Common (4)
System.Formats.Cbor (4)
System.Formats.Nrbf (1)
System.IO.FileSystem.Watcher (4)
System.IO.Hashing (21)
System.Memory (6)
System.Net.Http (7)
System.Net.Http.WinHttpHandler (1)
System.Net.NetworkInformation (1)
System.Net.Primitives (14)
System.Net.Security (16)
System.Net.Sockets (1)
System.Net.WebSockets (2)
System.Numerics.Tensors (35)
System\Numerics\Tensors\netcore\TensorPrimitives.Half.cs (25)
110BitConverter.HalfToInt16Bits((Half)(object)y!),
127BitConverter.HalfToInt16Bits((Half)(object)x!),
164BitConverter.HalfToInt16Bits((Half)(object)y!),
200BitConverter.HalfToInt16Bits((Half)(object)y!),
214result = (T)(object)BitConverter.Int16BitsToHalf(
253BitConverter.HalfToInt16Bits((Half)(object)y!),
273BitConverter.HalfToInt16Bits((Half)(object)z!),
291BitConverter.HalfToInt16Bits((Half)(object)y!),
292BitConverter.HalfToInt16Bits((Half)(object)z!),
316BitConverter.HalfToInt16Bits(
317(Half)TUnary.Invoke((float)BitConverter.Int16BitsToHalf(x)));
351BitConverter.HalfToInt16Bits((Half)TBinary.Invoke(
352(float)BitConverter.Int16BitsToHalf(x),
353(float)BitConverter.Int16BitsToHalf(y)));
390BitConverter.HalfToInt16Bits((Half)TAggregate.Invoke(
391(float)BitConverter.Int16BitsToHalf(x),
392(float)BitConverter.Int16BitsToHalf(y)));
424return BitConverter.HalfToInt16Bits((Half)TAggregate.Invoke(
432return BitConverter.HalfToInt16Bits((Half)TAggregate.Invoke(
440return BitConverter.HalfToInt16Bits((Half)TAggregate.Invoke(
445public static short IdentityValue => BitConverter.HalfToInt16Bits((Half)TAggregate.IdentityValue);
455BitConverter.HalfToInt16Bits((Half)TTernary.Invoke(
456(float)BitConverter.Int16BitsToHalf(x),
457(float)BitConverter.Int16BitsToHalf(y),
458(float)BitConverter.Int16BitsToHalf(z)));
System.Private.CoreLib (516)
System.Private.DataContractSerialization (38)
System\Xml\XmlBinaryReader.cs (13)
1271if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int16TextWithEndElement))
1278if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int16TextWithEndElement))
1294if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int32TextWithEndElement))
1301if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int32TextWithEndElement))
1317if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int64TextWithEndElement))
1324if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.Int64TextWithEndElement))
1340if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.FloatTextWithEndElement))
1347if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.FloatTextWithEndElement))
1363if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.DoubleTextWithEndElement))
1370if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.DoubleTextWithEndElement))
1386if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.DecimalTextWithEndElement))
1393if (BitConverter.IsLittleEndian && IsStartArray(localName, namespaceUri, XmlBinaryNodeType.DecimalTextWithEndElement))
1432if (BitConverter.IsLittleEndian)
System.Private.Uri (7)
System.Private.Windows.Core (4)
System.Private.Xml (18)
System.Reflection.Metadata (15)
System.Resources.Extensions (1)
System.Runtime (1)
System.Runtime.Extensions (1)
System.Runtime.Numerics (10)
System.Security.Cryptography (5)
System.Security.Cryptography.Pkcs (2)
System.Text.Encoding.CodePages (6)
System.Text.Encodings.Web (1)
System.Text.Json (14)
System.Text.RegularExpressions.Generator (1)
System.Windows.Forms.Design (1)
vbc (4)
VBCSCompiler (4)