0

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..

andrelange91
  • 1,018
  • 3
  • 21
  • 48

1 Answers1

3

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:

teo van kot
  • 12,350
  • 10
  • 38
  • 70
mybirthname
  • 17,949
  • 3
  • 31
  • 55