开发者

How to create variables from strings in arcobjects?

开发者 https://www.devze.com 2023-01-05 12:28 出处:网络
This hopefully is a simple question with a simple answer.If I have a list box or something that has a list of like 4 years (like 2006 through 2009), how do I programmatically make variables of these y

This hopefully is a simple question with a simple answer. If I have a list box or something that has a list of like 4 years (like 2006 through 2009), how do I programmatically make variables of these years with names like pTable2006, pTable2007, etc (as ITable of course).

If this isn't possible and I have publicly declared these tables in the declarations (like pTable2006 as ITable, pTable2007 as ITable, etc), how can I programmatically assign these variables based on user choice? What I'm asking is, if the user wants to choose years 2006 and 2007, how can I write this: pTable & ListBox.Items.Item(0) = [table path string] & ListBox.Items.Item(0) (please ignore the syntax of the "listbox", I'm just trying to come up with an example)

I hope that makes sense. I'm not sure the best way to ask that, but whenever I put something like pTable &a开发者_JS百科mp; "string", I get an error.

Thanks, Adrian


I'd consider using a generic dictionary of ITable where "2005" would be the key. http://adventuresdotnet.blogspot.com/2007/10/vbnet-generic-dictionaries.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号