Fixed-Point Numeric Formatting in C#


This content was proof-read by Grammarly. You can Try Grammary for FREE

The Fixed-Point Numeric Formatting string returns the integer and the decimal digits with the negative symbol (if provided). The Fixed-Point Numeric formatting staring also accepts the precision specifier which indicates the number of decimal digits .

Fixed-Point Numeric Formatting in C#

Below is a sample sourecode demonstrating the Fixed-Point Numeric formatting using the Numeric Format String “F” and “F4”.


Are you a .NET Developer planning to integrate GraphQL for .NET in your Application? Check out this book
using System;

namespace ConsoleApplication1

{

internal class Program

{

// Fixed-Point Numeric Formatting in C#

private static void Main(string[] args)

{

float input = 765.56F;

Console.WriteLine("{0:F}", input);

Console.WriteLine("{0:F5}", input);

Console.ReadLine();

}

}

}
Fixed-Point Numeric Formatting in C#
%d bloggers like this: