• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 323
  • Last Modified:

Creating a 'run-time' class.

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
Unimatrix_001
Asked:
Unimatrix_001
1 Solution
 
Kalpesh ChhatralaSoftware ConsultantCommented:
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
 
Unimatrix_001Author Commented:
Hi kalpesh,

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

Thanks,
Uni
0
 
Kalpesh ChhatralaSoftware ConsultantCommented:
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Unimatrix_001Author Commented:
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
 
SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:
0
 
Unimatrix_001Author Commented:
Samir - how does that fit my requirements?
0
 
John ClaesSenior .Net Consultant & Technical AnalistCommented:
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
 
Unimatrix_001Author Commented:
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
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Sounds more like you want a Visual Studio Add-In:
http://msdn.microsoft.com/en-us/vbasic/bb968855
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
@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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Tackle projects and never again get stuck behind a technical roadblock.
Join Now