*   >> Lezen Onderwijs artikelen >> science >> programming

Console Application gebruik Structures ( struct trefwoord ) in C # 1.1 en 2.0 ( Dot Net )

//console applicatie met Structures ( struct trefwoord ) in C # 1.1 en 2.0 ( Dot Net )

using System; < br >

namespace struc

{

class struc

{

static void Main ( )

{

student s = nieuwe leerling ( ) ;

s.show1 ( ) ;

s.name = Console.ReadLine ( ) ;

s.roll = int .Parse ( Console.ReadLine ()) ;

s.fees = int.Parse ( Console.ReadLine ()) ;

s.show ( ) ;

Console .WriteLine ( "Naam : { 0 } \\ nRoll No. : { 1 } \\ nFees : { 2 } " , s.name , s.roll , s.fees ) ;

Console.

ReadLine ( ) ;

}

}

struct student

{

openbare string naam ;

openbare float vergoedingen ; < br >

openbare int roll ;

public void Show ( )

{

Console.WriteLine ( "Student Detail ");

}

public void show1 ( )

{

Console.WriteLine ( "Naam invoeren , Roll nee, honoraria van de Student.

");

}

}

}


Copyright © 2008 - 2016 Lezen Onderwijs artikelen,https://onderwijs.nmjjxx.com All rights reserved.