Exemple #1
0
 public async void GetObjWithId()
 {
     AVObject character = AVObject.CreateWithoutData("Sport", "5b4464a49f5454003b178628");
     await character.FetchAsync().ContinueWith(t =>
     {
         if (character.IsKeyDirty("totalTime"))
         {
             character.FetchAsync();
         }
         Console.WriteLine("name:" + character.Get <string>("name"));
         Console.WriteLine("totalTime:" + character.Get <double>("totalTime")); //此处用int取小数的话,不会报错,会自动被转化为int
         Console.WriteLine("grade:" + character.Get <string>("grade"));
         //if(character.is)
         // Console.WriteLine("noExist:" + character.Get<string>("noExist")); //报异常
     });
 }