Posts

Showing posts from January 2, 2019

Jablonec nad Nisou

Image
Jablonec nad Nisou Basisdaten Staat: Tschechien Region: Liberecký kraj Bezirk: Jablonec nad Nisou Fläche: 3138,2278 [1] ha Geographische Lage: 50° 44′  N , 15° 10′  O 50.727777777778 15.17 475 Koordinaten: 50° 43′ 40″  N , 15° 10′ 12″  O Höhe: 475  m n.m. Einwohner: 45.771 (1. Jan. 2018) [2] Postleitzahl: 466 01 Kfz-Kennzeichen: L Verkehr Bahnanschluss: Liberec–Tanvald Struktur Status: Stadt Ortsteile: 8 Verwaltung Bürgermeister: Petr Beitl (Stand: 2017) Adresse: Mírové náměstí 3100/19 467 51 Jablonec nad Nisou Gemeindenummer: 563510 Website: www.mestojablonec.cz Jablonec nad Nisou (deutsch: Gablonz an der Neiße ) ist eine Stadt mit 45.771 Einwohnern (1. Januar 2018) im Okres Jablonec nad Nisou im Liberecký kraj in Tschechien. Inhaltsverzeichnis 1 Geographische Lage 2 Geschichte 2.1 Demographie 3 Wirts...

Why inheriting from a Collection changes accessibility levels?

Image
-2 I've created 3 classes, A, B and C. B inherits from A C inherits a Collection of A However, I can't understand why when inheriting from a collection, the derived class can access only the protected member of the base class. public class A public int MyPublic get; set; protected int MyProtected get; set; internal int MyInternal get; set; protected internal int MyProtectedInternal get; set; public class B : A B MyB get; set; B() MyB.MyProtected++; MyB.MyInternal++; MyB.MyPublic++; MyB.MyProtectedInternal++; public class C : Collection<A> C MyC get; set; C() MyC[0].MyProtected++; // Inaccessible due to its protection level. MyC[0].MyInternal++; MyC[0].MyPublic++; MyC[0].MyProtectedInternal++; c# inheritance share | improve this question edited Nov 12 '18 at 0:51 Charlie 593 2 8 26 asked Nov 11 '18 at 21:18 eminem 3 1 6 C does not inherit from A . C inherits from Collection<...