- using System;
-
- namespace BagarRajuClassConsoleProj.ModuleClasses
- {
- public class Greeks
- {
- private Greeks()
- { }
- public static int count = 20;
-
- }
- public class TestGreek
- {
- Greeks.count = 10;
- }
- }
In the above code, the "count" field is inaccessible in TestGreek class.
It arises following an error message.
The name 'count' does not exist in the current context.
But as per my knowledge, the static fields can accessible in another class.