Ambiguous reference in Stream
Posted
by
Sharpeye500
on Stack Overflow
See other posts from Stack Overflow
or by Sharpeye500
Published on 2011-01-08T00:13:10Z
Indexed on
2011/01/08
1:53 UTC
Read the original article
Hit count: 428
c#
This is the webservice method i have
LoadImageFromDB(int ID, ref Stream streamReturnVal)
I have this on the top of the section using Stream = System.IO.MemoryStream;
Whenever i consume this method(update web reference) from a web application, i get this error
'Stream' is an ambiguous reference between 'System.IO.Stream' and 'WebReference.Stream'
Any thoughts?
In webservice class
using Stream = System.IO.MemoryStream;
LoadImageFromDB(int ID, ref Stream streamReturnVal);
In web page where above webservice is consumed:
using WebReference;
Stream streamReturnVal = null;
streamReturnVal = new MemoryStream();
WebserviceInstanceName.LoadImageFromDB(100,streamReturnVal );
PS: Stream - is from System.IO.Stream
© Stack Overflow or respective owner