I`ve stumbled upon the piece of code that I immediately stealed for my project:
http://docs2x.smartfoxserver.com/api-do ... Index.html
But there`s an issue with
Code: Select all
List<SFSRoomVariable> roomVars = new List<SFSRoomVariable>();
roomVars.Add(new SFSRoomVariable("desc", "Darts game, public, bestScore > 100"));
settings.variables = roomVars;
Compiler can`t process the last assignemnt because it cant cast from List<SFSRoomvariable> to List<RoomVariable>.
This article explains why it might be a bad idea http://stackoverflow.com/questions/1817 ... tbaseclass
Could please anybody cooment if I`m Ok to use
Code: Select all
settings.Variables = roomVars.ConvertAll(x => (RoomVariable)x);