Reputation: 2575
Do not know how to convert Me.Base
to C#
Imports Microsoft.VisualBasic
Public Class ReplaceHTML
Inherits System.IO.Stream
Private Base As System.IO.Stream
Public Sub New(ByVal ResponseStream As System.IO.Stream)
If ResponseStream Is Nothing Then
Throw New ArgumentNullException("ResponseStream")
Me.Base = ResponseStream
End Sub
End Class
full code is here
thanks!
Upvotes: 3
Views: 2160
Reputation: 4187
try using this.Base
this
tells it to use the current instance of the class
Edit:
with your updated question i think it should look more like
public class ReplaceHTML : System.IO.Stream
{
private System.IO.Stream Base;
public ReplaceHTML(System.IO.Stream ResponseStream)
{
if (ResponseStream == null)
{
throw new ArgumentNullException("ResponseStream");
}
this.Base = ResponseStream;
}
}
Upvotes: 6
Reputation: 351596
Try this:
public YourClass(System.IO.Stream ResponseStream)
{
if (ResponseStream == null)
{
throw new ArgumentNullException("ResponseStream");
}
// the "this" is optional here but I left it to show
// that it is the equivalent of VB's "Me"
this.Base = ResponseStream;
}
Upvotes: 4