andrelange91 andrelange91 - 24 days ago 11
C# Question

What is the difference, in internal set property

i am new to mvc and c#, and i came across these.

This is not a problem as such, just something i've been wondering about.

what is the difference between these two ?

public string Title { get; set; }
public string Title { get; internal set; }


and when do you use what ?

removing internal, does not really seem to do anything..

And since i do not know the specific names of these, i haven't been able to find any answers on my searches..

Answer

You need to check what is access modifiers: internal (C# Reference)

The internal keyword is an access modifier for types and type members. Internal types or members are accessible only within files in the same assembly: