Which code snippet correctly declares a variable named userId with a public get and private set?
get
set
public int userID { get; private set; }
public int userID <get, set>;
public int userID = { public get, private set }; Official documentation: Properties
public int userID = { public get, private set };
public int userID [get, private set];