Adding contraints and inheriting

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hi All

A simple question I hope

I have a class

public abstract class authenticatedBoundForm<T> : authenticatedPage,
IControlPage

I want to add contraints to T specifially the new() contraint.

How can I do this without T being forced to inherit/implement
authenticatedPage, IControlPage

Thanks
Paul
 
"Paul" <[email protected]> a écrit dans le message de (e-mail address removed)...

| public abstract class authenticatedBoundForm<T> : authenticatedPage,
| IControlPage
|
| I want to add contraints to T specifially the new() contraint.
|
| How can I do this without T being forced to inherit/implement
| authenticatedPage, IControlPage

public abstract class authenticatedBoundForm<T> : authenticatedPage,
IControlPage where T : new()

T is not affected by the inheritance, only by the constraints.

Joanna
 
Back
Top