|
-
May 25th, 2011, 02:01 PM
#2
Re: Dynamic Object Names
Short tip:
Code:
while (i < j)
listView1.Columns.Add(String.Format("myObject{0}", i), 200);
Things to consider about what you've done...
* You are using the same variable name twice, "myObject", once as a string, and again as a ColumnHeader. Which is it? You assign a string value to it, but then you try to create another new object of the same name... why is that?
* You are refering to an array "myHeadings[]", where is this created? Where are you adding items to that array? What type of objects does this array have in it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|