samedi 24 décembre 2016

C# cannot convert from 'int' to 'string'

I want use "Random rnd = new Random();"

public int dzien;

private void generator_Tick(object sender, EventArgs e)
{
 Random rnd = new Random();

 dzien = rnd.Next(1, 11);      
 webBrowser1.Document.GetElementById("birthDateDay").SetAttribute("value", dzien);
}

And when i want run program i got error:

cannot convert from 'int' to 'string'

This is in line "webBrowser1...." on "dzien".




Aucun commentaire:

Enregistrer un commentaire