Click here to Skip to main content
15,900,724 members
Home / Discussions / C#
   

C#

 
General2 texbox value transfar ti cobobox Pin
Member 1204736710-Oct-15 17:21
Member 1204736710-Oct-15 17:21 
QuestionIs this a secure way to encrypt? Pin
Jassim Rahma10-Oct-15 11:27
Jassim Rahma10-Oct-15 11:27 
AnswerRe: Is this a secure way to encrypt? Pin
ZurdoDev12-Oct-15 5:26
professionalZurdoDev12-Oct-15 5:26 
QuestionFill Image in tile mode not working fine form Zoom Pin
Le@rner9-Oct-15 2:52
Le@rner9-Oct-15 2:52 
AnswerRe: Fill Image in tile mode not working fine form Zoom Pin
Matt T Heffron9-Oct-15 8:31
professionalMatt T Heffron9-Oct-15 8:31 
QuestionCan't add reference to project, Visual studio Pin
Member 120456929-Oct-15 0:00
Member 120456929-Oct-15 0:00 
QuestionRe: Can't add reference to project, Visual studio Pin
CHill609-Oct-15 1:02
mveCHill609-Oct-15 1:02 
AnswerRe: Can't add reference to project, Visual studio Pin
Member 120456929-Oct-15 1:11
Member 120456929-Oct-15 1:11 
GeneralRe: Can't add reference to project, Visual studio Pin
CHill609-Oct-15 1:32
mveCHill609-Oct-15 1:32 
GeneralRe: Can't add reference to project, Visual studio Pin
Member 120456929-Oct-15 1:52
Member 120456929-Oct-15 1:52 
GeneralRe: Can't add reference to project, Visual studio Pin
CHill609-Oct-15 2:03
mveCHill609-Oct-15 2:03 
GeneralRe: Can't add reference to project, Visual studio Pin
Member 120456929-Oct-15 2:05
Member 120456929-Oct-15 2:05 
GeneralRe: Can't add reference to project, Visual studio Pin
CHill609-Oct-15 2:13
mveCHill609-Oct-15 2:13 
GeneralRe: Can't add reference to project, Visual studio Pin
Member 120456929-Oct-15 2:32
Member 120456929-Oct-15 2:32 
GeneralRe: Can't add reference to project, Visual studio Pin
CHill609-Oct-15 2:44
mveCHill609-Oct-15 2:44 
GeneralRe: Can't add reference to project, Visual studio Pin
Dave Kreskowiak9-Oct-15 15:02
mveDave Kreskowiak9-Oct-15 15:02 
Questionc# webbrowser control to filter all xmlhttprequest Pin
JueYingCh8-Oct-15 23:00
JueYingCh8-Oct-15 23:00 
GeneralProject Explanation Pin
c31777968-Oct-15 14:59
c31777968-Oct-15 14:59 
GeneralRe: Project Explanation Pin
BillWoodruff8-Oct-15 19:49
professionalBillWoodruff8-Oct-15 19:49 
GeneralRe: Project Explanation Pin
Mycroft Holmes8-Oct-15 20:16
professionalMycroft Holmes8-Oct-15 20:16 
GeneralRe: Project Explanation Pin
OriginalGriff8-Oct-15 21:44
mveOriginalGriff8-Oct-15 21:44 
QuestionConvert Json to C# Pin
Waqas Ahmad8-Oct-15 7:55
Waqas Ahmad8-Oct-15 7:55 
My Php file is returning this json. how can i covert it in c#.
{"response"[
{"user_id":"26","crtloc_lat":"47.678238","crtloc_lng":"-122.131416"},
{"user_id":"27","crtloc_lat":"9.350192","crtloc_lng":"-95.391006"},
{"user_id":"28","crtloc_lat":"47.678238","crtloc_lng":"-122.131416"}
]
}
php file is present at anybodyhere.net/returntest.php

My Code
public async void sendmsg() {
WebRequest request = WebRequest.Create(http://anybodyhere.net/returntest.php);
WebResponse response = await request.GetResponseAsync();


List<Responsemsg> responsemsg;
using (var stream = new StreamReader(response.GetResponseStream()))
{


responsemsg=JsonConvert.DeserializeObject<Responsemsg>(stream.ReadToEnd());

}

foreach (var item in responsemsg)
{
Console.WriteLine("id={0},latitude={1},longitude={2}", item.user_id, item.crtloc_lat, item.crtloc_lng);
}




}



}
public class Responsemsg
{
public string user_id { get; set; }
public string crtloc_lat { get; set; }
public string crtloc_lng { get; set; }
}

public class RootObject
{
public List<Responsemsg> responsemsg { get; set; }
}
</pre>
AnswerRe: Convert Json to C# Pin
Richard Deeming8-Oct-15 9:19
mveRichard Deeming8-Oct-15 9:19 
QuestionSave Stream from Multiple IP Camera Pin
Enobong Adahada8-Oct-15 5:33
Enobong Adahada8-Oct-15 5:33 
AnswerRe: Save Stream from Multiple IP Camera Pin
CHill608-Oct-15 6:21
mveCHill608-Oct-15 6:21 

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.