37
1
using System;
2
using System.Collections.Generic;
3
4
public class Program
5
{
6
public static void Main()
7
{
8
List<Listita> L = new List<Listita>();
9
L.Add(new Listita("Uno", (float)10.5));
10
L.Add(new Listita("Uno", 20));
11
L.Add(new Listita("Uno", 14));
12
L.Add(new Listita("Uno", 13));
13
L.Add(new Listita("Uno", 100));
14
15
Función(L);
16
}
17
18
public static void Función(List<Listita> L)
19
{
20
for(int x = 0; x < L.Count; x++)
21
{
22
Console.WriteLine("Probabilidad: 10%");
23
}
24
}
25
}
26
27
public class Listita
28
{
29
public string nombre { get; set; }
30
public float importe { get; set; }
31
public Listita(){ }
32
public Listita(string n, float i)
33
{
34
nombre = n;
35
importe = i;
36
}
37
}
Cached Result