Open lilo73 opened 5 years ago
Cast it to correct expected object and use try catch for any problem or malformed object in deserialize part!
try{ var dlcont = new TLRequestDeleteContact() { Id = new TLInputUser() { AccessHash = User.AccessHash.Value, UserId = User.Id }, }; var Res = await Client.SendRequestAsync<TLLink>(dlcont); } ...
client.SendRequestAsync<TLRequestDeleteContact>(req);
expected return object is not TLRequestDeleteContact. It is TLLink. This causes an exception to be raised.