What does the _Default keyword mean in C #

For example, I created a web page and it has the keyword _Default.

public partial class _Default : System.Web.UI.Page 

What does this keyword do here? What's the point?

+3
source share
4 answers

_Default is not a keyword, this is your class name.

+15
source

default is the keyword used in the C # switch statement, and in VB.Net it is applied to the default property. This is why the IDE renamed your _Default class based on the page name (Default.aspx). _Default itself is not a keyword and looks different because every other word on this line is a keyword.

+5
source

, . a-z, A-Z '_'.

+1

. . , asp.net .

+1

Source: https://habr.com/ru/post/1732181/


All Articles