Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Dear All,

 

 

I have developed a simple security class which contains a private nested class. This nested class displays a form on the screen at the users (programmers) request to obtain credentials from the end user. Is this good or bad practice, and if it's bad, then is there anyother way of declaring the form and still retaining its abstraction (the reason being I want the form to remain fixed and not be changed dynamically)?

 

 

Thanks in advance,

Paul.

  • *Experts*
Posted

Maybe I'd have to see your code, but you can certainly create a form from an abstract class that's not a nested class.

 

When you try and view a form in the designer and your form inherits from an abstract class, that will give you an error within Visual Studio. That error is because Visual Studio wants to instantiate the base class and can't because it's abstract. But that error is only in Visual Studio - at runtime you can still create your form (that inherits from the abstract class).

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

I see. But I thought, to display a form, I'd have to inherit from the Windows.Forms.Form class...

 

Hmmm... I'm just adding to what I've got at the moment, but I'll post the code shortly.

 

Thanks, Nerseus.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...