Skip to content

Commit 436dd05

Browse files
committed
Corrección error en singleton
1 parent 6fe516a commit 436dd05

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Roadmap/31 - SIMULADOR JUEGOS OLÍMPICOS/c#/deathwing696.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void ShowMedalReport()
121121

122122
public class Olimpiadas
123123
{
124-
private static readonly Olimpiadas instance;
124+
private static Olimpiadas instance;
125125
private List<Evento> events;
126126
private Dictionary<string, int> countryRanking;
127127

@@ -139,9 +139,9 @@ public static Olimpiadas Instance
139139
get
140140
{
141141
if (instance == null)
142-
return new Olimpiadas();
143-
else
144-
return instance;
142+
instance = new Olimpiadas();
143+
144+
return instance;
145145
}
146146
}
147147

0 commit comments

Comments
 (0)