Im new to C# and I only want to know how to set an objects tag to a number for example
button a= new button();
a.parent=this;
...
a.tag=12; (but it says it must be an object and I dont want to pass an object to it , any int to object conversion?)
kshahnazari
0
Newbie Poster
Recommended Answers
Jump to PostYou can use a string, it is an object.
If you absolutely need an int, you can create a small class :public class Tag {public int value = 0;}
that you use in your form :
Tag tag = new Tag {value …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.