Comments on: C# Access Modifiers https://code-maze.com/csharp-access-modifiers/ Learn. Code. Succeed. Tue, 21 Mar 2023 13:05:20 +0000 hourly 1 https://wordpress.org/?v=6.7.5 By: chia tohumu faydaları https://code-maze.com/csharp-access-modifiers/#comment-7746 Tue, 21 Mar 2023 13:05:20 +0000 https://code-maze.com/?p=4289#comment-7746 chia tohumu faydaları

]]>
By: Marinko https://code-maze.com/csharp-access-modifiers/#comment-519 Wed, 05 Dec 2018 09:00:00 +0000 https://code-maze.com/?p=4289#comment-519 In reply to Ashraf Ramadan.

Hello Ashraf, you are right. It seems that I wanted to make that class static, and then I didn’t … and …. confusion. As you can see in the protected internal example, I did it well 😀 Anyhow, thank you for the suggestion.

]]>
By: Ashraf Ramadan https://code-maze.com/csharp-access-modifiers/#comment-518 Wed, 05 Dec 2018 08:27:00 +0000 https://code-maze.com/?p=4289#comment-518 I think in the internal Example…
in the print() method
we can not use a class member directly — the class must be static or we must define an object from this class
so replace this line of code
Console.WriteLine(NumberClassInFirstProject.number);

with
NumberClassInFirstProject num = new NumberClassInFirstProject();
Console.WriteLine(num.number);

]]>