the best of the best way is:
var floatNumber = 12.5523;
var x = floatNumber - Math.Truncate(floatNumber);
result you can convert however you like
More Related Contents:
- How to create an object during runtime in .net
- Creating a DateTime in a specific Time Zone in c#
- What’s the best way of implementing a thread-safe Dictionary?
- How can I send emails through SSL SMTP with the .NET Framework?
- How to get the index of an element in an IEnumerable?
- Is there a way to indefinitely pause a thread?
- Get size of file on disk
- Json.NET serialize object with root name
- C# “internal” access modifier when doing unit testing
- Async/Await vs Threads
- How to serialize/deserialize simple classes to XML and back
- Fastest way to add new node to end of an xml?
- How to Get XML Node from XDocument
- How to Draw a Rounded Rectangle with WinForms (.NET)?
- No Source available
- GC.Collect() and Finalize
- GetHashCode Guidelines in C#
- Total number of items defined in an enum
- Protect .NET code from reverse engineering?
- Mocking generic methods in Moq without specifying T
- string.Empty vs null.Which one do you use?
- How do I debug .NET 4.6 framework source code in Visual Studio 2017?
- Could not load file or assembly ‘System.Net.Http.Formatting’ or one of its dependencies. The system cannot find the path specified
- ReaderWriterLock vs lock{}
- Using multiple instances of MemoryCache
- How to log Trace messages with log4net?
- Why do arrays in .net only implement IEnumerable and not IEnumerable?
- Should the order of LINQ query clauses affect Entity Framework performance?
- Can we consume a Blazor component as a Web Component within a regular non-Blazor HTML page?
- Call has been made on garbage collected delegate in C#?