Use “Nx” for x decimal digits.
public void DisplayNDecimal(double dbValue, int nDecimal)
{
Console.WriteLine(dbValue.ToString("N" + nDecimal));
}
More Related Contents:
- Passing data from one desktop/web application to another desktop app
- Gmail Error :The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required
- How to get index using LINQ? [duplicate]
- How do I write a backslash (\) in a string?
- What is the purpose of self tracking entities?
- Generics and casting – cannot cast inherited class to base class
- Unity Scripts edited in Visual studio don’t provide autocomplete
- Is the use of dynamic considered a bad practice?
- Garbage collector and circular reference
- How to draw line and select it in Panel
- External json vulnerable because of Json.Net TypeNameHandling auto?
- Reading a file used by another process [duplicate]
- Inheriting from List
- Very simple C# CSV reader
- Read large txt file multithreaded?
- Multithreading reference? [closed]
- Different forms of the WCF service contract interface
- How to make correct date format when writing data to Excel
- Use “real” CultureInfo.CurrentCulture in WPF Binding, not CultureInfo from IetfLanguageTag
- Serialization breaks in .NET 4.5
- How to use Acrylic Accent in Windows 10 Creators Update?
- Datatable vs Dataset
- Finding a subsequence in longer sequence
- How to make two-way binding on Blazor component
- LINQ: Select where object does not contain items from list
- Looking for clean WinForms MVC tutorial for C# [closed]
- When is it appropriate to use the KnownType attribute?
- Self deletable application in C# in one executable
- Datatable select with multiple conditions
- regex to split line (csv file)