knowing the interfaces that an object implements



hi all,

i have a function that accepts Object as an argument.Depending on whether
the passed object
implements Idisposable , i want to call dispose on that object.
How can i check whether this object implements Idisposable ?

I would be thankful for any pointer on the same.

sanjay


.



Relevant Pages

  • Re: Freeze dried corpses
    ... What is the cheapest legal and practical way to dispose of a human ... Standard funerals seem very expensive to me. ... Dave Smith ... Prev by Date: ...
    (uk.philosophy.humanism)
  • using statment with sql connection
    ... I know that dispose is called on an ... object when it leaves the using clause but was also wondering if the closed ... John ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: troubles with finally statement and objects
    ... > using construct check for null before it calls .Dispose? ... Jon Skeet - ... If replying to the group, please do not mail me too ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ( ot) Report from Cozumel, Mexico 4:00 A.M.
    ... I don't think even the EPA would risk life or property trying to dispose of ... Prev by Date: ...
    (rec.radio.shortwave)
  • Diff Between Setting an object to NULL and Dispose()
    ... wats the Diff Between Setting an object to NULL and calling the ... Dispose() method for that object? ... Prev by Date: ...
    (microsoft.public.dotnet.general)

Loading