Solved

Creating a 'run-time' class.

Posted on 2011-02-17
10
284 Views
Last Modified: 2012-05-11
Hi,

I'm vaguely familiar with the idea of design-time and run-time differences, particularly how the WinForms editor runs UserControls in real-time when they are on the form, such as layout managers etc...

What I'm wanting to know is, is there such a thing as a 'run-time' class? Where I have a class that perhaps through the use of reflection is capable of generating or altering code, while I am in the code viewer? When I say class I'd actually prefer a real C# class, but I don't know exactly how that would fit together, unless it has to be a custom component or something?

Thanks,
Uni
0
Comment
Question by:Unimatrix_001
10 Comments
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 34915327
check below link there is sample for Runtime Class

Nice example for Runtime Code.

http://olondono.blogspot.com/2008/02/creating-code-at-runtime.html
0
 
LVL 3

Author Comment

by:Unimatrix_001
ID: 34915342
Hi kalpesh,

Thanks although that's not quite what I'm looking for...

Thanks,
Uni
0
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 34915421
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 3

Author Comment

by:Unimatrix_001
ID: 34915435
Hi Kalpesh,

Perhaps I haven't quite explained things very well... The short tale is, I want to create C# class that is 'live' while my actual program is still in design mode and let them interact; similar to how a usercontrol can run in realtime when placed on the form designer, even though the actual application is in design mode. Like that but with a class instead of a usercontrol.

Thanks,
Uni
0
 
LVL 11

Expert Comment

by:SAMIR BHOGAYTA
ID: 34915547
0
 
LVL 3

Author Comment

by:Unimatrix_001
ID: 34915568
Samir - how does that fit my requirements?
0
 
LVL 10

Expert Comment

by:John Claes
ID: 34915573
Uni,

Short,
You want a C# Class that can be used/Called in Design Time (in designer view)
The best way herefor is the use of static Objects. This because they don't need to be initialised and can easly be used for desgner use.

If you can't use Static objects you should see to use Shared Objects
0
 
LVL 3

Author Comment

by:Unimatrix_001
ID: 34915591
Poor beggar,

You want a C# Class that can be used/Called in Design Time (in designer view)
Yes, but I want the C# class that is called to be in runtime mode.

Could you give a short example or link me to something that does as I'm getting nothing useful.

Thanks,
Uni
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 34916258
Sounds more like you want a Visual Studio Add-In:
http://msdn.microsoft.com/en-us/vbasic/bb968855
0
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
ID: 34923909
@kalpesh2804 and @samirbhogayta

When you are posting, please do not simply post a link - all that shows is you are able to use Google to search and does nothing to suggest that you have any knowledge about the subject.  Links can also fail, so should your comment happen to answer the question and the link fails, then the solution is no longer valid.

If you can add a brief description in your own words about what can be found at the link, then add the link, then should the link fail, then all is not lost and your solution will still hold some value.

teylyn
Zone Advisor, Microsoft Office
teylyn -at- experts-exchange.com
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reading the Web.Config using IIS 7.5? 4 35
Cant save 3D 4 19
Following an example - Why do I need to click Save button twice? 3 25
List<PaisEntity> - show some 1 24
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question