CS
cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Text;
namespace Utilisation_Propriétés_Règles_Gestion
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Entrez le code de l'article : ");
string code = Console.ReadLine();
Console.WriteLine("Entrez le nom de l'article : ");
string nom = Console.ReadLine();
Console.WriteLine("Entrez la taille de l'article : ");
string taie = Console.ReadLine();
decimal prix;
Console.WriteLine("Entrez le prix de l'article : ");
Decimal.TryParse(Console.ReadLine(), out prix);
PanierAchat pa = new PanierAchat(code, nom, taie, prix);
Console.WriteLine(pa.ToString());
}
}
class PanierAchat
{
public PanierAchat(string code, string name, string size, decimal price)
{
codeItem = code;
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run