Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Can't implement iDisposable correctly

$
0
0

I am working in iOS. The latest build for indie version.

I am doing something I have done in Visual Studio many times in the past. Implement IDisposable on the class. I get this error on compile. "type used in using statement must be implicitly convertible to System.IDisposable"

public class Access: IDisposable
{ public void IDisposable.Dispose() { if(_dbclient!=Nullable) _dbclient.Dispose(); }

}

using (LettersApp.Business.Data.Access a=new LettersApp.Business.Data.Access()) {

}

Is this a bug or by design because of phone os architecture?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>