Errors in the C# samples on website

Forum for C#/Windows development

Errors in the C# samples on website

Postby DougNS » 11 Mar 2015, 12:22

On this page (http://dev.theeyetribe.com/csharp/), there are errors that prevent the source from compiling. This webpage should be updated.

1. ListenerLoop()
Code: Select all
p.RawData = json;
p.Category = (string)jObject["category"];
p.Request = (string)jObject["request"];
p.StatusCode = (string)jObject["statuscode"];

There are case errors here. It should read p.rawdata, p.category, p.request, p.statuscode, all lower case.

2. ListenerLoop()
Variable json is never defined. It's unclear where this is coming from.

3. ListenerLoop()
Code: Select all
isRunning = true;
should read
Code: Select all
bool isRunning = true;


4. ListenerLoop()
Code: Select all
Console.Out.WriteLine("Error while reading response: " + ex.Message;

You are missing closing parentheses. It should read:
Code: Select all
Console.Out.WriteLine("Error while reading response: " + ex.Message);


Doug Girard
Nirodha Software
DougNS
 
Posts: 5
Joined: 11 Mar 2015, 10:43

Return to C#