jeudi 14 janvier 2016

How to cast an object to internal class

I am viewing source code of an internal .Net class and want to modify a function using reflection

object responseObject = request.ConnectionAsyncResult.InternalWaitForCompletion();
ConnectStream writeStream = responseObject as ConnectStream;
if (writeStream == null) ...

How should I write the second line of the code ?

ConnectStream is an internal class





Aucun commentaire:

Enregistrer un commentaire