Kód: Vybrat vše
b=zjisti_typ_proměné (a);
..proste funkce ktera vraci typ (int,string,atp.)existuje něco takového ?

Kód: Vybrat vše
b=zjisti_typ_proměné (a);
Kód: Vybrat vše
try
{
vlastni prikazy;
}
catch
{
pole.Text=null;
MessageBox.Show("Zadej číselnou hodnotu!");
}
Kód: Vybrat vše
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int a, b, c;
a = 1;
b = 0;
c = 0;
string s=("");
s = ("konej");
try
{
Console.WriteLine("Zadejte počet pípnutí: ");
b = Console.ReadLine();
}
catch
{
b = null;
Console.WriteLine("zadej ciselnou hodnotu");
}
Kód: Vybrat vše
Error 1 Cannot implicitly convert type 'string' to 'int' C:\Users\Michal\Desktop\Linux & programing\C#\pipani.cs 23 21 ConsoleApplication1
Error 2 Cannot convert null to 'int' because it is a non-nullable value type C:\Users\Michal\Desktop\Linux & programing\C#\pipani.cs 27 21 ConsoleApplication1
Zpět na “Programování a tvorba webu”
Uživatelé prohlížející si toto fórum: Žádní registrovaní uživatelé a 6 hostů