Přepsání čísla v požadovaném formátotu
C# .NET
namespace test_int16
{
public partial class Form1 : Form
{
string error1 = "Číslo je pro toto pole příliš dlouhé.";
public Form1()
{
InitializeComponent();
}
private void btnvysledek_Click(object sender, EventArgs e)
{
int cislo;
try
{
cislo = Convert.ToInt16(txtcislo.Text);
}
catch (Exception)
{
MessageBox.Show(error1);
return;
}
txtvysledek.Text = cislo.ToString("N0");
}
}
}
Neformátovaný
Přidáno: 19.1.2017
Expirace: Neuvedeno