Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
public void currency(string srcCurrency,string dstCurrency)
{
string xeString = String.Format("http://www.xe.com/ucc/convert.cgi?Amount=1&From={0}&To={1}", srcCurrency, dstCurrency);
System.Net.WebRequest wreq = System.Net.WebRequest.Create(new Uri(xeString));
System.Net.WebResponse wresp = wreq.GetResponse();
Stream respstr = wresp.GetResponseStream();
int read = respstr.Read(buf, 0, BUFFER_SIZE);
string result = Encoding.ASCII.GetString(buf, 0, read);
}



error:Error 16 The name 'BUFFER_SIZE' does not exist in the current context
Posted

1 solution

You didn't declare the variable BUFFER_SIZE. Possibly you had created the variable at top of the class & moved that with some more code to somewhere. Check Stream.Read Method[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900