Solved

Creating a 'run-time' class.

Posted on 2011-02-17
10
289 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

861 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