C
C#3mo 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
surwrenOP3mo ago
Nvm, all classes couldn't be refactored. Restarting MSVS + Unity fixed it
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX3mo ago
If you have no further questions, please use /close to mark the forum thread as answered

Did you find this page helpful?