Skip to content

Instantly share code, notes, and snippets.

namespace Test
{
public class Auswahl
{
public Auswahl(Produkt pro, int anzahl)
{
this.Pro = pro;
this.Anzahl = anzahl;
this.Preis = pro.Preis * anzahl;
}
@d630
d630 / aufgaben.sql
Last active July 13, 2018 02:27
Tag 14/24: SQL-Uebung
-- a)
UPDATE mitarbeiter
SET tagesarbeitszeit = 7
WHERE ma_id = 812;
-- b)
SELECT count(*)
FROM mitarbeiter
WHERE tagesarbeitszeit < 7.33;
@d630
d630 / Form1.cs
Created June 21, 2018 12:40
Windows Forms: r/w file
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;
using System.IO;
@d630
d630 / Form1.cs
Created June 21, 2018 12:39
Bilder bewegen
// TODO
@d630
d630 / Baum.cs
Last active July 13, 2018 02:19
Tag 13: Baum
namespace Baum
{
public class Baum
{
private int nr;
private double x;
private double y;
private short sta;
private float kro;
private string art;
@d630
d630 / Abteilung.cs
Last active July 6, 2018 01:34
Übung 1: C# + Windows Forms + MySQL (without DataGridView and MySqlDataAdapter)
namespace Datenbank
{
class Abteilung
{
public int abtNr;
public string abtName;
public Abteilung(int abtNr, string abtName)
{
this.abtNr = abtNr;
@d630
d630 / Form1.cs
Last active July 13, 2018 02:16
Tag 8: Calculator: Windows Forms, Delegates
using System;
using System.Windows.Forms;
namespace Calculator
{
public partial class Form1 : Form
{
public delegate double operate(double x, double y);
private operate op;
@d630
d630 / Program.cs
Created June 19, 2018 04:14
Throwing an exception
using System;
namespace Expections
{
class Fehler : ApplicationException
{
public Fehler() : base()
{
}
@d630
d630 / Program.cs
Last active July 13, 2018 02:18
Tag 11: Flugzeuge
namespace csharp
{
public class Flugzeug
{
private string hersteller;
private int maxSpeed;
private string immatNum;
private int anzahlFluegel = 1;
private const int LOOPINGSPEED = 320;
@d630
d630 / Form1.cs
Last active June 17, 2018 07:24
Windows Forms: Login
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;