Static is a keyword that makes it instantiate only once internal when the static class is consumed first.
In the class without static, we have to instantiate to use, but we can instantiate many times and store different data on each instance.
This is the customer class that gets the customer's information.
We will move the System.Environment.MachineName; to a different class and use with static and without static to see the difference.
namespace BasicCsharp { public class CompName { public string getName() { return System.Environment.MachineName; } } }
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: