Quote:
Can anyone please tell the meaning of undermentioned line in c#?
The line:
public abstract class BasePage<T> : Page where T : class
Means that you create an
abstract class[
^] that derives from
Page
. The
BasePage
class has one
Generic Type Parameter[
^],
T
, and the
where T : class
means that when you create a new instance of
BasePage
, the generic type parameter must be a
reference type[
^], not a
value type[
^]. If you pass a value type as generic type parameter, you get a compiler error.