Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing Application in a Library
Message
From
26/03/2008 14:40:21
 
 
To
26/03/2008 14:21:23
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01305846
Message ID:
01305869
Views:
10
Hi,

>Coming from VFP my tendency is to want to subclass the Application object in my libraries.
>
>Library:
>
>public abstract class MYApplication : System.Windows.Application
>
>
>Application:
>
>public partial class myApp : MYApplication
>
>
>But I have a few questions...
>
>Is this an unusual way to do this?
>
>Any downside?

Can't think of any....

>Any upside? <g>

IMO: the ability to override the methods (and handle the events) of the base S.W.Application class. Essentially the same arguments as in VFP I guess - if you want to add global functionality later the plumbing is in place.

>In looking at it I think it may actually make application setup more complex than the way I am doing it now. (Creating a separate class to the side that contains my application wide static properties and methods.) Was just curious as to what is the common way to do this.

Probably no harm in mixing both approachs ?
Regards,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform