Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

get after point in c#

    string input_decimal_number = "1.50";
    var regex = new System.Text.RegularExpressions.Regex("(?<=[.])[0-9]+");
    if (regex.IsMatch(input_decimal_number))
    {
        string decimal_places = regex.Match(input_decimal_number).Value;
    }
Comment

get after point in c#

var decPlaces = (int)(((decimal)number % 1) * 100);
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# window form align right bottom 
Csharp :: monogame delta 
Csharp :: indexof c# 
Csharp :: lerp by timer unity 
Csharp :: scene manager load scene 
Csharp :: moq set delay to return 
Csharp :: Convert DataTable to excel file c# using epplus 
Csharp :: winform fixed size 
Csharp :: Unity Object rotation along any axis 
Csharp :: link form to a button in dashbord visual c# 
Csharp :: how to get relative path in c# 
Csharp :: c# remove xml invalid characters 
Csharp :: adding additional parameter to form submit 
Csharp :: c# split multiple options 
Csharp :: c# .net core entity framework one to many 
Csharp :: remove empty strings from list c# 
Csharp :: #grid 
Csharp :: unity stop object from rotating 
Csharp :: c# max sequence contains no elements 
Csharp :: tilemap shader 
Csharp :: c# response.contenttype set filename 
Csharp :: method c# 
Csharp :: c# move directory 
Csharp :: c# int division to double 
Csharp :: c# Write a program to reverse an array or string 
Csharp :: c# get name of type 
Csharp :: reference to gameobject in different scene unity 
Csharp :: entity framework id not auto increment 
Csharp :: assert.equal 
Csharp :: concurrent post request c# 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =