473,387 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Create a class dynamicaly in run-time?

How to create a class dynamicaly at run-time?
Some documentations in MSDN say that it is feasible
using the class "TypeBuilder",but I don't know how to do.
Is there anyone who can help me? Sample code is
appreciated.
Nov 15 '05 #1
4 10038
Two main ways, look up "C# CodeDOM" and Reflect.Emit. These are the two
ways to dynamically create types at runtime.

See "Execution Time Code Generation" here for a great example and
comparison:
http://www.gotdotnet.com/team/ericgu/

Richard

--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"peter" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
How to create a class dynamicaly at run-time?
Some documentations in MSDN say that it is feasible
using the class "TypeBuilder",but I don't know how to do.
Is there anyone who can help me? Sample code is
appreciated.

Nov 15 '05 #2
But the link for "Execution Time Code Generation" is not
available in the web page
http://www.gotdotnet.com/team/ericgu/
-----Original Message-----
Two main ways, look up "C# CodeDOM" and Reflect.Emit. These are the twoways to dynamically create types at runtime.

See "Execution Time Code Generation" here for a great example andcomparison:
http://www.gotdotnet.com/team/ericgu/

Richard

--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"peter" <an*******@discussions.microsoft.com> wrote in messagenews:06****************************@phx.gbl...
How to create a class dynamicaly at run-time?
Some documentations in MSDN say that it is feasible
using the class "TypeBuilder",but I don't know how to do. Is there anyone who can help me? Sample code is
appreciated.

.

Nov 15 '05 #3
Well I have the project files so if you want just email me and I'll let you
have them. Should be obvious what my address is.

Richard

--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"peter" <an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl...
But the link for "Execution Time Code Generation" is not
available in the web page
http://www.gotdotnet.com/team/ericgu/
-----Original Message-----
Two main ways, look up "C# CodeDOM" and Reflect.Emit.

These are the two
ways to dynamically create types at runtime.

See "Execution Time Code Generation" here for a great

example and
comparison:
http://www.gotdotnet.com/team/ericgu/

Richard

--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"peter" <an*******@discussions.microsoft.com> wrote in

message
news:06****************************@phx.gbl...
How to create a class dynamicaly at run-time?
Some documentations in MSDN say that it is feasible
using the class "TypeBuilder",but I don't know how to do. Is there anyone who can help me? Sample code is
appreciated.

.

Nov 15 '05 #4
But your address "ch*****@yumspamyumYahoo.com" may be
incorrect,I tried several times,but failed.
my email is "he****@sina.com".Please post it to me.
Thanks a lot.
-----Original Message-----
Well I have the project files so if you want just email me and I'll let youhave them. Should be obvious what my address is.

Richard

--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"peter" <an*******@discussions.microsoft.com> wrote in messagenews:07****************************@phx.gbl...
But the link for "Execution Time Code Generation" is not available in the web page
http://www.gotdotnet.com/team/ericgu/
>-----Original Message-----
>Two main ways, look up "C# CodeDOM" and Reflect.Emit.

These are the two
>ways to dynamically create types at runtime.
>
>See "Execution Time Code Generation" here for a great

example and
>comparison:
>http://www.gotdotnet.com/team/ericgu/
>
>Richard
>
>--
>C#, .NET and Complex Adaptive Systems:
>http://blogs.geekdojo.net/Richard
>"peter" <an*******@discussions.microsoft.com> wrote in

message
>news:06****************************@phx.gbl...
>> How to create a class dynamicaly at run-time?
>> Some documentations in MSDN say that it is feasible >> using the class "TypeBuilder",but I don't know how
to do.
>> Is there anyone who can help me? Sample code is
>> appreciated.
>
>
>.
>

.

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: LornaJane | last post by:
I've not done very much Java before and now I'm working on a j2me application, however I think the trouble I have is generic java. I can compile, preverify and jar everything fine, but the...
1
by: fareeda | last post by:
Is it possible to create an exe (instead of a class file) such that it can run without java being insatlled. My target-environment is going to be Windows. Regards Fareeda
0
by: lucotuslim | last post by:
Hi, I am new to VB.Net. Can anyone help me to solve the problem? I created a Class under VB.Net which intends to be use by Access (other machine). - Add a Setup project. - But the Setup project...
3
by: leon | last post by:
hello friends, i am writing a page aspx and creating controls dinamicaly and then i must to create for each control the events as well. Anybody to know how????? happy day lion
7
by: Steven.Xu | last post by:
Hello everyone! I have a problem about create an instance automatically in C#. Now I have a class: namespace1.namespace11.CClass01. I want to create it's instance in a function named...
3
by: Kathy Burke | last post by:
Hi, I'm trying to open an executable file from intranet asp.net page in ..Net 1.1. The following code fires but hangs after processing for about 45 seconds (no error message, just hangs). Dim p...
1
by: Roger Gordon | last post by:
I have the VB.NET Standard Edition. I'm taking a VB.NET class in school. Last night we tried to create a class libary and there was no option to do this in the Standard Edition. Our instructor...
8
by: KP | last post by:
How can we create class which other class can't be inherited or we can say how to protect class from inheritance ? ( e.g. final class in java, if a class is final in java, then this class can't be...
0
by: IndulgentCoder | last post by:
Hi all, I'm new to scripts forum. I've a .NET wrapper class written in c# that makes some calls to native dlls using platform invocation. The native dlls inturn perform read operation on MSOffice...
1
by: gundam | last post by:
I need to use Javascript in classic ASP for a project. However, I seem to have problem using javascript combined with ASP. Here are the questions: 1) ERROR to create class, see code below: <%@...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.