0

I want to add a parameter to image path.Otherwise,I'll call those images through a parameter with integer number. For example:

hamlekullanici.Image = Image.FromFile(@"images\\"+hamlekullanici+".png");

Username -- > hamle 
Variable -- > integer

So,I want to show different images according to hamle number.How can I do that?

MaxCoder88
  • 2,374
  • 6
  • 41
  • 59

1 Answers1

0

Can you use string.Format to create the string for the image filename? Something like...

hamlekullanici.Image = Image.FromFile(
        string.Format(@"images\{0}{1}.png", username, number);

...or have I misunderstood what you're trying to do?

IanR
  • 4,703
  • 3
  • 29
  • 27