Click here to Skip to main content
15,898,373 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Function Graph Pin
erdinc3527-Dec-13 4:52
erdinc3527-Dec-13 4:52 
GeneralRe: C# Function Graph Pin
Richard MacCutchan27-Dec-13 4:57
mveRichard MacCutchan27-Dec-13 4:57 
Questionordered list as in python Pin
gianfrancoguzzo27-Dec-13 3:17
gianfrancoguzzo27-Dec-13 3:17 
AnswerRe: ordered list as in python Pin
Richard MacCutchan27-Dec-13 3:39
mveRichard MacCutchan27-Dec-13 3:39 
GeneralRe: ordered list as in python Pin
gianfrancoguzzo27-Dec-13 4:18
gianfrancoguzzo27-Dec-13 4:18 
AnswerRe: ordered list as in python Pin
Nicholas Marty27-Dec-13 3:40
professionalNicholas Marty27-Dec-13 3:40 
GeneralRe: ordered list as in python Pin
gianfrancoguzzo27-Dec-13 3:46
gianfrancoguzzo27-Dec-13 3:46 
GeneralRe: ordered list as in python Pin
Nicholas Marty27-Dec-13 3:50
professionalNicholas Marty27-Dec-13 3:50 
GeneralRe: ordered list as in python Pin
gianfrancoguzzo27-Dec-13 4:08
gianfrancoguzzo27-Dec-13 4:08 
GeneralRe: ordered list as in python Pin
Nicholas Marty27-Dec-13 4:11
professionalNicholas Marty27-Dec-13 4:11 
GeneralMessage Closed Pin
27-Dec-13 4:01
gianfrancoguzzo27-Dec-13 4:01 
GeneralRe: ordered list as in python Pin
Nicholas Marty27-Dec-13 4:06
professionalNicholas Marty27-Dec-13 4:06 
GeneralRe: ordered list as in python Pin
gianfrancoguzzo27-Dec-13 4:10
gianfrancoguzzo27-Dec-13 4:10 
AnswerRe: ordered list as in python Pin
gianfrancoguzzo27-Dec-13 3:43
gianfrancoguzzo27-Dec-13 3:43 
GeneralRe: ordered list as in python Pin
BillWoodruff27-Dec-13 13:02
professionalBillWoodruff27-Dec-13 13:02 
AnswerRe: ordered list as in python Pin
BillWoodruff27-Dec-13 4:04
professionalBillWoodruff27-Dec-13 4:04 
GeneralRe: ordered list as in python Pin
gianfrancoguzzo27-Dec-13 4:17
gianfrancoguzzo27-Dec-13 4:17 
GeneralRe: ordered list as in python Pin
BillWoodruff27-Dec-13 11:32
professionalBillWoodruff27-Dec-13 11:32 
GeneralRe: ordered list as in python Pin
gianfrancoguzzo27-Dec-13 15:06
gianfrancoguzzo27-Dec-13 15:06 
GeneralRe: ordered list as in python Pin
gianfrancoguzzo29-Dec-13 2:00
gianfrancoguzzo29-Dec-13 2:00 
QuestionConsole.WriteLine properties of something Pin
Dick Lasy27-Dec-13 2:06
Dick Lasy27-Dec-13 2:06 
Somebody some can help me as C#beginners. I want calculate properties of rectangle.

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Vererbung
{
    class Rechteck
    {
        private double laenge;
        private double breite;

        struct Parameter
        {
            private double breite;
            private double laenge;

            public Parameter(double laenge, double breite)
            {
                this.breite = breite;
                this.laenge = laenge;
            }
        }

        public double getLaenge() { return laenge; }
        public double getBreite() { return breite; }

        public double getUmfang()
        {
            return 2 * laenge + 2 * breite;
        }
        public double getFlache()
        {
            return laenge * breite;
        }
        public double getDiagonale()
        {
            return Math.Sqrt(laenge * laenge + breite * breite);
        }

        static void Main(string[] args)
        {
            Console.WriteLine("Gib die Länge vom Rechteck: ");
            string l = Console.ReadLine();

            Console.WriteLine("Gib die Breite vom Rechteck: ");
            string b = Console.ReadLine();

            Rechteck obj = new Rechteck();
            obj.laenge = 0;
            obj.breite = 0;

            Console.WriteLine("Rechteck Länge: " + l + "\nRechteck Breite: " + b);
            Console.WriteLine("Die Diagonale beträgt: " obj.getDiagonale(l, b));
            Console.WriteLine("Der Umfang beträgt: " obj.getUmfang(l, b));
            Console.WriteLine("Die Fläche beträgt: " obj.getFlache(l, b));
        }
        }
        }

AnswerRe: Console.WriteLine properties of something Pin
Richard MacCutchan27-Dec-13 3:38
mveRichard MacCutchan27-Dec-13 3:38 
AnswerRe: Console.WriteLine properties of something Pin
BillWoodruff27-Dec-13 3:39
professionalBillWoodruff27-Dec-13 3:39 
AnswerRe: Console.WriteLine properties of something Pin
Vinay Jade27-Dec-13 4:39
professionalVinay Jade27-Dec-13 4:39 
GeneralRe: Console.WriteLine properties of something Pin
Dick Lasy27-Dec-13 4:49
Dick Lasy27-Dec-13 4:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.