C
C#4w ago
surwren

Can't Refactor Or Save this Class File (Lazily Loaded Singleton)

using System;

public sealed class SessionCache {
private static readonly Lazy<SessionCache> lazy =
new Lazy<SessionCache>(() => new SessionCache());

public static SessionCache Instance { get { return lazy.Value; } }
public UserData userData { get; set; }

private SessionCache() {
}
}
using System;

public sealed class SessionCache {
private static readonly Lazy<SessionCache> lazy =
new Lazy<SessionCache>(() => new SessionCache());

public static SessionCache Instance { get { return lazy.Value; } }
public UserData userData { get; set; }

private SessionCache() {
}
}
Am I doing something wrong in the syntax? .NET CORE 2.1
3 Replies
surwren
surwrenOP4w ago
Nvm, all classes couldn't be refactored. Restarting MSVS + Unity fixed it
Unknown User
Unknown User4w ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX4w ago
If you have no further questions, please use /close to mark the forum thread as answered
Want results from more Discord servers?
Add your server