0% found this document useful (0 votes)
18 views1 page

Exemplu Ordine Parametri

The document discusses the order of parameter evaluation in a method. It defines a class with Minim and Suma methods that take integers as parameters. Main initializes an instance of the class, reads in integers from the console, calls Minim to find the minimum of two numbers and assign to properties m1 and m2. It then calls Suma, passing the results of Minim calls as parameters, and outputs the result and the property values.

Uploaded by

simon362003
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Exemplu Ordine Parametri

The document discusses the order of parameter evaluation in a method. It defines a class with Minim and Suma methods that take integers as parameters. Main initializes an instance of the class, reads in integers from the console, calls Minim to find the minimum of two numbers and assign to properties m1 and m2. It then calls Suma, passing the results of Minim calls as parameters, and outputs the result and the property values.

Uploaded by

simon362003
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

using System; using System.Collections.Generic; using System.Linq; using System.

Text; //Exemplu de ordine a evaluarii parametrilor intr-o metoda //Se utilizeaza executia cu F5(Debug) //Dupa start executie cu F5 se activeaza Debug->Windows->Locals si Call Stack namespace Exemplu_ordine_parametri { class Program { class OrdineParametri { public int m1, m2; public int Minim(int x, int y) { int m; if (x < y) m = x; else m = y; return m; } public int Suma(int a, int b) { int s; s = a + b; return s; } } static void Main(string[] args) { OrdineParametri exemplu=new OrdineParametri(); int a, b, c, d; a = Int32.Parse(Console.ReadLine()); b = Int32.Parse(Console.ReadLine()); c = Int32.Parse(Console.ReadLine()); d = Int32.Parse(Console.ReadLine()); exemplu.m1 = exemplu.Minim(a, b); exemplu.m2 = exemplu.Minim(c, d); Console.WriteLine(exemplu.Suma(exemplu.Minim(a,b),exemplu.Minim(c,d))); Console.WriteLine(exemplu.m1); Console.WriteLine(exemplu.m2); } } }

You might also like