Total Page Preview:   000000001412

What is the difference between public, static and void?

All these are access modifiers in C#:

Public declared variables or methods are accessible anywhere in the application.

Static declared variables or methods are globally accessible without creating an instance of the class.

The compiler stores the address of the method as the entry point and uses this information to begin execution before any objects are created.

Void is a type modifier that states that the method or variable does not return any value.

 

In Hindi:

Public : yadi ham variavles or method ko public declare karte hai to all application me kahi bhi access kar sakte hai.

 

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments