কম্পিউটার

C# এ BitConverter.Int64BitsToDouble() পদ্ধতি


C#-এ BitConverter.Int64BitsToDouble() পদ্ধতিটি নির্দিষ্ট 64-বিট স্বাক্ষরিত পূর্ণসংখ্যাকে দ্বিগুণ-নির্ভুল ফ্লোটিং-পয়েন্ট নম্বরে পুনরায় ব্যাখ্যা করতে ব্যবহৃত হয়।

সিনট্যাক্স

নিম্নলিখিত বাক্য গঠন −

public static double Int64BitsToDouble (long val);

উপরে, প্যারামিটার মান হল রূপান্তরিত সংখ্যা।

উদাহরণ

আসুন এখন BitConverter.Int64BitsToDouble() পদ্ধতি প্রয়োগ করার জন্য একটি উদাহরণ দেখি -

using System;
public class Demo {
   public static void Main(){
      long d = 9846587687;
      Console.Write("Value (64-bit signed integer) = "+d);
      double res = BitConverter.Int64BitsToDouble(d);
      Console.Write("\nValue (double-precision floating point number) = "+res);
   }
}

আউটপুট

এটি নিম্নলিখিত আউটপুট −

তৈরি করবে
Value (64-bit signed integer) = 9846587687
Value (double-precision floating point number) = 4.86486070491012E-314

উদাহরণ

আসুন আরেকটি উদাহরণ দেখি -

using System;
public class Demo {
   public static void Main(){
      long d = 20;
      Console.Write("Value (64-bit signed integer) = "+d);
      double res = BitConverter.Int64BitsToDouble(d);
      Console.Write("\nValue (double-precision floating point number) = "+res);
   }
}

আউটপুট

এটি নিম্নলিখিত আউটপুট −

তৈরি করবে
Value (64-bit signed integer) = 20
Value (double-precision floating point number) = 9.88131291682493E-323

  1. C# এ Char.IsLower() পদ্ধতি

  2. C# এ Char.IsLetterOrDigit() পদ্ধতি

  3. Int16.C# এ CompareTo() পদ্ধতি

  4. C# এ BitConverter.DoubleToInt64Bits() পদ্ধতি