Click here to Skip to main content
15,887,436 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need help with Functions, ASAP! Pin
Eddy Vluggen13-Apr-18 9:12
professionalEddy Vluggen13-Apr-18 9:12 
GeneralRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 9:28
mve#realJSOP13-Apr-18 9:28 
AnswerRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 9:10
mve#realJSOP13-Apr-18 9:10 
PraiseRe: Need help with Functions, ASAP! Pin
Eddy Vluggen13-Apr-18 9:15
professionalEddy Vluggen13-Apr-18 9:15 
GeneralRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 9:33
mve#realJSOP13-Apr-18 9:33 
GeneralRe: Need help with Functions, ASAP! Pin
BillWoodruff13-Apr-18 18:54
professionalBillWoodruff13-Apr-18 18:54 
Questiongetting a 200 or what ever it is status_code not a ok Pin
sadsack12-Apr-18 9:04
sadsack12-Apr-18 9:04 
AnswerRe: getting a 200 or what ever it is status_code not a ok Pin
Afzaal Ahmad Zeeshan12-Apr-18 9:23
professionalAfzaal Ahmad Zeeshan12-Apr-18 9:23 
But 200 is OK! The property you are referring to also says the same, HttpStatusCode Enumeration (System.Net), only the difference is that your property is an enum and it might be getting translated to a readable form. Try this,
C#
Console.WriteLine((int)httpResponse.StatusCode);
But again, remember, it is always better to use the readable/understandable names of the state; OK, Bad request, etc. Rather than the HTTP codes.

And yes, similarly for the error printing, you would need to use the following,
C#
Console.WriteLine("Error code: {0}", (int)httpResponse.StatusCode);
Read the guide on MDN for more on HTTP codes and also the MSDN link I provided above to understand a bit more about this HTTP status code and how .NET supports it.

200 OK - HTTP | MDN
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

GeneralRe: getting a 200 or what ever it is status_code not a ok Pin
sadsack17-Apr-18 13:59
sadsack17-Apr-18 13:59 
AnswerRe: getting a 200 or what ever it is status_code not a ok Pin
Richard MacCutchan12-Apr-18 21:38
mveRichard MacCutchan12-Apr-18 21:38 
GeneralRe: getting a 200 or what ever it is status_code not a ok Pin
sadsack17-Apr-18 14:02
sadsack17-Apr-18 14:02 
QuestionWrite a 2D array of objects in range Excel C# Pin
Gtari Abir12-Apr-18 5:29
Gtari Abir12-Apr-18 5:29 
AnswerRe: Write a 2D array of objects in range Excel C# Pin
Dave Kreskowiak12-Apr-18 7:29
mveDave Kreskowiak12-Apr-18 7:29 
QuestionValidate User Against Active Directory Pin
Kevin Marois11-Apr-18 10:23
professionalKevin Marois11-Apr-18 10:23 
AnswerRe: Validate User Against Active Directory Pin
Keviniano Gayo11-Apr-18 21:55
Keviniano Gayo11-Apr-18 21:55 
GeneralRe: Validate User Against Active Directory Pin
Kevin Marois12-Apr-18 5:47
professionalKevin Marois12-Apr-18 5:47 
GeneralRe: Validate User Against Active Directory Pin
Keviniano Gayo13-Apr-18 1:49
Keviniano Gayo13-Apr-18 1:49 
QuestionGetting a directory path if directory name is given Pin
NiKHiLMS11-Apr-18 3:17
NiKHiLMS11-Apr-18 3:17 
AnswerRe: Getting a directory path if directory name is given Pin
Richard MacCutchan11-Apr-18 3:32
mveRichard MacCutchan11-Apr-18 3:32 
GeneralRe: Getting a directory path if directory name is given Pin
NiKHiLMS11-Apr-18 21:38
NiKHiLMS11-Apr-18 21:38 
GeneralRe: Getting a directory path if directory name is given Pin
Jochen Arndt11-Apr-18 22:37
professionalJochen Arndt11-Apr-18 22:37 
GeneralRe: Getting a directory path if directory name is given Pin
NiKHiLMS11-Apr-18 22:51
NiKHiLMS11-Apr-18 22:51 
GeneralRe: Getting a directory path if directory name is given Pin
Jochen Arndt12-Apr-18 0:01
professionalJochen Arndt12-Apr-18 0:01 
AnswerRe: Getting a directory path if directory name is given Pin
MadMyche11-Apr-18 5:04
professionalMadMyche11-Apr-18 5:04 
GeneralRe: Getting a directory path if directory name is given Pin
NiKHiLMS11-Apr-18 21:39
NiKHiLMS11-Apr-18 21:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.