public int GetPlayerCash(string steamId = null) { if (string.IsNullOrEmpty(steamId)) { throw new CustomException( ErrorCodes.Codes.NullSteamId); } playerHandler.CheckNewPLayerExistence(steamId); List <object> playerInfo = new List <object>(); int cash = 0; try { playerInfo = dataWorker.ReadData(DataConfig.Lists.Main) .Single(item => item.First().ToString() == steamId); cash = Convert.ToInt32(playerInfo.ElementAt(2)); } catch { throw new CustomException( ErrorCodes.Codes.NotExistingData); } return(cash); }