hello friends,
i m stuck up in one code. actually i want to make function for split last 2 decimal values. if i got 1122.45 amount then i want to split last two decimal values "45" and store in text box.. hope you are understand.. please help..
thanks in advance


Dhirendra MisraRank #4,173 · 360 reputationPosted Dec 27, 2013, 1:10 AM EST
What I understood from your question that you want to split from decimal value.
You can try this.
txtbox.Text = s;
Thanks
VulpesRank #55 · 29.2K reputationPosted Dec 27, 2013, 1:15 AM EST
Abhay ShankerRank #375 · 6.7K reputationPosted Dec 27, 2013, 1:16 AM EST
double value = 1122.45;
var values = value.ToString(CultureInfo.InvariantCulture).Split('.');
txtBox.Text =Convert.ToString( int.Parse(values[0]));
Naeem KhanRank #2,072 · 698 reputationPosted Dec 27, 2013, 1:25 AM EST