Ask a Question related to ASP.NET General, Design and Development.
-
Ilyas #1
Re: Accessing all properties of an object at Runtime
Use reflection...
"Softwaremaker" <msdn@removethis.softwaremaker.net> wrote in message news:<#b1mBjhQDHA.2432@TK2MSFTNGP10.phx.gbl>...> Hi Fellow developers,
>
> What is the recommended method to display a list of all properties of an
> object at Runtime
>
> Public Function CompareObj _
>
> (ByVal NewObject As Object, ByVal SrcObject As Object) As Boolean
>
> End Function
>
> I want to be able to access all the property name and their values at
> runtime.
>
> How do I do that ?
>
> Any help is appreciated.
>
> Thank You.Ilyas Guest
-
Accessing the Field of a Bind Expression at runtime.
Greetings I'm currently attempting to write a control that will extend functionality of databound controls (ie TextBox etc). However, while I can... -
Accessing COM properties that take arguments
sorry if this has been covered before, but I have an external COM object which has properties that require arguments... e.g. to write a property I... -
Changing movie properties in runtime
Hello, Can anyone help me with this unusual task. I am loading and .swf in another file on frame event, the .swf can have any frame rate, stage... -
Accessing the visible property of a User Control at runtime
I need to make visisble/invisible my user control at runtime I am using code-behind and there is no access to the control here What do I do -
accessing non-linked external casts in runtime
Is it possible to access a cast that is not linked to a movie? Can anyone tell me how? thanks J -
Softwaremaker #2
Re: Accessing all properties of an object at Runtime
Hi,
Thanks for the reply. But could you point me to something more informative.
Thanks
Willie
+++++++++++++++++
"Ilyas" <ilyas@igsoftwaresolutions.co.uk> wrote in message
news:34a10b47.0307040749.6ab37825@posting.google.c om...news:<#b1mBjhQDHA.2432@TK2MSFTNGP10.phx.gbl>...> Use reflection...
>
> "Softwaremaker" <msdn@removethis.softwaremaker.net> wrote in message> > Hi Fellow developers,
> >
> > What is the recommended method to display a list of all properties of an
> > object at Runtime
> >
> > Public Function CompareObj _
> >
> > (ByVal NewObject As Object, ByVal SrcObject As Object) As Boolean
> >
> > End Function
> >
> > I want to be able to access all the property name and their values at
> > runtime.
> >
> > How do I do that ?
> >
> > Any help is appreciated.
> >
> > Thank You.
Softwaremaker Guest
-
Yan-Hong Huang[MSFT] #3
RE: Accessing all properties of an object at Runtime
Hello William,
Assemblies contain modules, modules contain types, and types contain
members. Reflection provides objects that encapsulate assemblies, modules,
and types. You can use reflection to dynamically create an instance of a
type, bind the type to an existing object, or get the type from an existing
object. You can then invoke the type's methods or access its fields and
properties. For an example, we could use Reflection.PropertyInfo to
discover information such as the name, data type, declaring type, reflected
type, and read-only or writable status of a property, and to get or set
property values.
For details, please refer to MSDN topic "Discovering Type Information at
Run Time"
[url]http://msdn.microsoft.com/library/en-us/cpguide/html/cpcondiscoveringtypeinf[/url]
ormationatruntime.asp?frame=true
Hope it helps.
Best regards,
yhhuang
VS.NET, Visual C++
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? [url]http://www.gotdotnet.com[/url]
--------------------
!From: "Softwaremaker" <msdn@removethis.softwaremaker.net>
!Subject: Accessing all properties of an object at Runtime
!Date: Fri, 4 Jul 2003 18:40:55 +0800
!Lines: 29
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
!Message-ID: <#b1mBjhQDHA.2432@TK2MSFTNGP10.phx.gbl>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!NNTP-Posting-Host: bb-203-125-116-38.singnet.com.sg 203.125.116.38
!Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
!Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.aspnet:32281
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!Hi Fellow developers,
!
!What is the recommended method to display a list of all properties of an
!object at Runtime
!
!Public Function CompareObj _
!
!(ByVal NewObject As Object, ByVal SrcObject As Object) As Boolean
!
!End Function
!
!I want to be able to access all the property name and their values at
!runtime.
!
!How do I do that ?
!
!Any help is appreciated.
!
!Thank You.
!
!--
!William T
!Chief Software Developer
!Software Architect
!Softwaremaker.Net Pte Ltd
!
!+++++++++++++++++++++++++++++
!
!
!
Yan-Hong Huang[MSFT] Guest



Reply With Quote

