|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Custom PropertyI'm trying to create a class and with in that class i want to access or
change the property statement by using "For" or "For each..." statement... is this possible? Please point me to the right direction if it is possible. Please advice. Thanks in advance. Ros >I'm trying to create a class and with in that class i want to access or Which property statement? Can you post the code you have so far?>change the property statement >by using "For" or "For each..." statement... is If the property returns something that can be iterated over you can do>this possible? that, yes. Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. not the property itself...
i ment each individual property in a class... i looked at CollectionBase Class, but i was not sure if it would return the property... write the following statements for each property in MyCollection 'rest of the codes here next Show quoteHide quote "Mattias Sjögren" wrote: > > >I'm trying to create a class and with in that class i want to access or > >change the property statement > > Which property statement? Can you post the code you have so far? > > > >by using "For" or "For each..." statement... is > >this possible? > > If the property returns something that can be iterated over you can do > that, yes. > > > Mattias > > -- > Mattias Sjögren [C# MVP] mattias @ mvps.org > http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com > Please reply only to the newsgroup. > >i ment each individual property in a class... i looked at CollectionBase I'm still not sure I fully understand what you're trying to do, but I>Class, but i was not sure if it would return the property... write the >following statements > >for each property in MyCollection > 'rest of the codes here >next think you may be looking for reflection. For Each pi As PropertyInfo In GetType().GetProperties() Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. thanks for the advice Mattias, i'll try that.
Thanks again. Ros Show quoteHide quote "Mattias Sjögren" wrote: > >i ment each individual property in a class... i looked at CollectionBase > >Class, but i was not sure if it would return the property... write the > >following statements > > > >for each property in MyCollection > > 'rest of the codes here > >next > > > I'm still not sure I fully understand what you're trying to do, but I > think you may be looking for reflection. > > For Each pi As PropertyInfo In GetType().GetProperties() > > > > Mattias > > -- > Mattias Sjögren [C# MVP] mattias @ mvps.org > http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com > Please reply only to the newsgroup. >
ShellExecute in VB2005
How to minimize to system tray ? VS 2003 Keep software running The Irish fada (áéíóú/ÁÉÍÓÚ) and encryption/decryption problem! How to create a "DataSource" & "Items" properties on Custom Combob Binding sources question in Vs2005 Working with structures and the New keyword Detect Remote Shutdown Alignment problem displaying .txt file in window's textbox? Encyrption in VB and Decryption in VB.NET |
|||||||||||||||||||||||