-
Warum sollten Parameter für die Attribute einer Klasse im Klassencode selbst überprüft werden? Aus Gründen der Datenkapselung.
-
Von wo aus ist der Zugriff auf private Klassenmitglieder möglich? Auf private Mitglieder kann nur aus der Klasse selbst, in der sie deklariert sind, zugegriffen werden. Bei Vererbung werden sie versteckt.
-
Hat eine Property einen Datentyp? Oui.
-
Finden Sie einen möglichen Anwendungsfall für schreibgeschützte Properties!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace csharp | |
| { | |
| public class Schiff | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace csharp | |
| { | |
| public class Konto | |
| { | |
| private double kontostand; | |
| public Konto() | |
| { | |
| this.kontostand = 5000.00; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ["10cc","The Worst Band In The World",2,1,"Sheet Music",170040,"spotify:track:2QuhQtkWjIgUnD0osMVxmQ","2018-05-21T12:33:54Z"] | |
| ["13th Floor Elevators","Slip Inside This House - Stereo LP Version",1,2,"Easter Everywhere",482278,"spotify:track:4GVRHAwABAV0v63YX9Go0p","2019-11-26T03:57:30Z"] | |
| ["20/20","Backyard Guys",10,1,"20/20",172240,"spotify:track:1OeUSRPye1E157Ca58ejJQ","2017-10-21T19:18:17Z"] | |
| ["20/20","Yellow Pills",2,1,"20/20",257733,"spotify:track:5FddI3pEApza2kSmc4HgUY","2017-10-21T19:18:17Z"] | |
| ["2raumwohnung","Bleib geschmeidig",5,1,"Kommt zusammen",294413,"spotify:track:0moaDBq6OXEp75PnAphgfY","2018-04-07T23:00:42Z"] | |
| ["2raumwohnung","Du und Ich",2,1,"Kommt zusammen",201306,"spotify:track:33QrenRAriTaOqM3cydFfT","2018-04-07T23:00:42Z"] | |
| ["2raumwohnung","Kommt zusammen",1,1,"Kommt zusammen",232786,"spotify:track:2L3Ogz0JhfNlBWOkocA1pD","2018-04-07T23:00:42Z"] | |
| ["2raumwohnung","Sexy Girl",3,1,"Kommt zusammen",285786,"spotify:track:2Zhnednf8tOLWNldP90d1X","2018-04-07T23:00:42Z"] | |
| ["31Knots","Chain Reaction",5,1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace csharp | |
| { | |
| public class Program | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace csharp | |
| { | |
| public class Foo | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Data; | |
| using System.Drawing; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Windows.Forms; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace csharp | |
| { | |
| public class Flugzeug | |
| { | |
| private string hersteller; | |
| private int maxSpeed; | |
| private string immatNum; | |
| private int anzahlFluegel = 1; | |
| private const int LOOPINGSPEED = 320; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace Expections | |
| { | |
| class Fehler : ApplicationException | |
| { | |
| public Fehler() : base() | |
| { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Windows.Forms; | |
| namespace Calculator | |
| { | |
| public partial class Form1 : Form | |
| { | |
| public delegate double operate(double x, double y); | |
| private operate op; |