On Jan 10, 2013, at 8:55 PM, Canning <[email protected]> wrote:
> Here is my code:
> 
>        try 
>        {
>            URL url = new URL("mysite.com/thefile.txt");
> 
>            BufferedReader in = new BufferedReader(new 
> InputStreamReader(url.openStream()));

`in` is a C# keyword, and thus can't be used to name your variable. Please 
choose a different name, such as `reader`.

Better would be to use C# types instead of Java types, as this will result in 
code that is reusable on MonoTouch and .NET:

        var c = new System.Net.WebClient ();
        var s = c.DownloadString ("http://mysite.com/thefile.txt";);

See also:

        http://msdn.microsoft.com/en-us/library/fhd1f0sw(VS.80).aspx

 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to