1 00:00:02,180 --> 00:00:06,350 Now instead of an interface you can also add the read only modifier. 2 00:00:06,350 --> 00:00:10,790 You can not add public or private or anything like that. 3 00:00:10,790 --> 00:00:17,690 This is not possible on an interface but you can at read only to make it clear that this property in 4 00:00:17,720 --> 00:00:24,260 whatever object you built based on this interface must only be set once and is read only thereafter 5 00:00:24,290 --> 00:00:26,400 so that it can't be changed off. 6 00:00:26,420 --> 00:00:28,370 Do you object has been initialized. 7 00:00:28,490 --> 00:00:36,210 This is also something if we use a type instead which you can use on a type if you want to though. 8 00:00:36,230 --> 00:00:41,960 So again these two things are very similar here but it's more common or seen more often that if you 9 00:00:41,960 --> 00:00:47,450 will really want to work with an object you use an interface for that and read only just one other thing 10 00:00:47,450 --> 00:00:54,020 you can add there as an extra feature you can set up with read only added here by the way you see I 11 00:00:54,020 --> 00:01:01,110 didn't added here in the class I didn't add read only here and still if I now go to User 1 and I try 12 00:01:01,110 --> 00:01:06,150 to set name to something else I get an error here already because it's read only. 13 00:01:06,230 --> 00:01:11,960 And of course I also get that if I save it and it tries to compile that so the interface is really having 14 00:01:11,960 --> 00:01:17,570 an effect here once we implemented into our class even though I didn't add read only here the class 15 00:01:17,570 --> 00:01:23,900 knows that it implements readable and it automatically assume state the property name which we have 16 00:01:23,900 --> 00:01:29,600 here which we need to have because of the interface is read only because that is what we set up inside 17 00:01:29,600 --> 00:01:30,550 of the interface. 18 00:01:30,650 --> 00:01:32,810 And that's of course pretty convenient as well.