Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Example
- {
- protected internal int value = 5;
- protected internal class MyProtectedInternalNestedClass //nested class
- {
- public int temp = 4;
- }
- }
- class ProtectedInternalExample
- {
- static void Main()
- {
- Example Obj = new Example();
- //the protected internal class and its member is accessible by the current assembly
- var obj2 = new Example.MyProtectedInternalNestedClass();
- Console.WriteLine("value is: {0}",Obj.value);
- Console.WriteLine("temp is: {0}", obj2.temp);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement