Is it possible to have "inherited partial structs" in c#?
- by Balazs
Is it possible to use partial structs to achieve something like this:
Have an asp.net page base class with the following defined:
public partial struct QuerystringKeys
{
public const string Username = "username";
public const string CurrentUser = "currentUser";
}
Have an asp.net page, which inherits from the base class mentioned above, extend the partial declaration:
public partial struct QuerystringKeys
{
/// <summary>
/// The page number of the review instances list
/// </summary>
public const string Page = "page";
}
The final goal is a QuerystringKeys struct with all three constant strings defined in it available to the asp.net page.