Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing mmUser
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01013572
Message ID:
01013589
Views:
18
mmUser User = mmAppBase.Factory.CreateUserObject();	
Console.WriteLine(User.InitVecField);
>
>If I comment out the Console.WriteLine() line above, it will compile and I can step through the code and watch it actually create a JdaUser object. Does anyone know how I can get the compiler to realize that the JdaUser object will be created so my InitVecField member should be available to me???
>
>Matthew J. Price

In your code above, try this instead:
mmUser User = mmAppBase.Factory.CreateUserObject();
JdaUser jda = (JdaUser)User;
Console.WriteLine(jda.InitVecField);
This way, the framework still sees the user object as an mmUser class, but when you need to access the JdaUser specific property, you can explicitly cast it to that type object for your specific use at that time.

HTH,
Chad
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform