Click here to Skip to main content
15,886,857 members
Home / Discussions / C#
   

C#

 
QuestionWMF to Base64String Pin
sunsher28-Jul-16 19:11
sunsher28-Jul-16 19:11 
AnswerRe: WMF to Base64String Pin
OriginalGriff28-Jul-16 19:39
mveOriginalGriff28-Jul-16 19:39 
GeneralRe: WMF to Base64String Pin
sunsher28-Jul-16 20:47
sunsher28-Jul-16 20:47 
GeneralRe: WMF to Base64String Pin
OriginalGriff28-Jul-16 21:30
mveOriginalGriff28-Jul-16 21:30 
GeneralRe: WMF to Base64String Pin
sunsher31-Jul-16 20:38
sunsher31-Jul-16 20:38 
GeneralRe: WMF to Base64String Pin
OriginalGriff31-Jul-16 20:50
mveOriginalGriff31-Jul-16 20:50 
GeneralRe: WMF to Base64String Pin
sunsher1-Aug-16 21:09
sunsher1-Aug-16 21:09 
QuestionRead JSON in C# Pin
Jassim Rahma28-Jul-16 7:24
Jassim Rahma28-Jul-16 7:24 
Hi,

I have a web service which returns JSON string like this:
{
  "valid": true,
  "messages": [
    "Cannot validate bank code length. No information available.",
    "Cannot get BIC. No information available."
  ],
  "iban": "BH00000000000000000000",
  "bankData": {
    "bankCode": "",
    "name": ""
  },
  "checkResults": {
    "bankCode": false
  }
}

I am able to get it using below code:
C#
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://openiban.com/validate/" + txtIBAN.Text.Trim());
try
{
    WebResponse response = request.GetResponse();
    using (Stream responseStream = response.GetResponseStream())
    {
        StreamReader reader = new StreamReader(responseStream, Encoding.UTF8);

        string strsb = reader.ReadToEnd();

    }
}
catch (WebException ex)
{
    WebResponse errorResponse = ex.Response;
    using (Stream responseStream = errorResponse.GetResponseStream())
    {
        StreamReader reader = new StreamReader(responseStream, Encoding.GetEncoding("utf-8"));
        String errorText = reader.ReadToEnd();
        // log errorText
    }
    throw;
}
but I want to know can I now read the value valid if it's rue or false?

Thanks,
Jassim[^]

Technology News @ www.JassimRahma.com

AnswerRe: Read JSON in C# Pin
Richard Deeming28-Jul-16 7:57
mveRichard Deeming28-Jul-16 7:57 
AnswerRe: Read JSON in C# Pin
Ravi Bhavnani28-Jul-16 11:14
professionalRavi Bhavnani28-Jul-16 11:14 
GeneralRe: Read JSON in C# Pin
Richard Deeming29-Jul-16 1:53
mveRichard Deeming29-Jul-16 1:53 
AnswerRe: Read JSON in C# Pin
Bernhard Hiller31-Jul-16 22:30
Bernhard Hiller31-Jul-16 22:30 
QuestionSend hindi sms from computer to mobile Pin
Member 1055429727-Jul-16 20:41
Member 1055429727-Jul-16 20:41 
GeneralRe: Send hindi sms from computer to mobile Pin
User 1106097927-Jul-16 20:54
User 1106097927-Jul-16 20:54 
AnswerRe: Send hindi sms from computer to mobile Pin
Daniel Pfeffer27-Jul-16 21:02
professionalDaniel Pfeffer27-Jul-16 21:02 
QuestionExclusive Code Execution, determine Memory Consumption of a Class Pin
User 1106097927-Jul-16 19:55
User 1106097927-Jul-16 19:55 
AnswerRe: Exclusive Code Execution, determine Memory Consumption of a Class Pin
Pete O'Hanlon27-Jul-16 23:20
mvePete O'Hanlon27-Jul-16 23:20 
GeneralRe: Exclusive Code Execution, determine Memory Consumption of a Class Pin
User 1106097927-Jul-16 23:23
User 1106097927-Jul-16 23:23 
AnswerRe: Exclusive Code Execution, determine Memory Consumption of a Class Pin
Richard Deeming28-Jul-16 1:41
mveRichard Deeming28-Jul-16 1:41 
PraiseRe: Exclusive Code Execution, determine Memory Consumption of a Class Pin
User 1106097928-Jul-16 2:06
User 1106097928-Jul-16 2:06 
QuestionWhy this Error Contract Kind come on Pin
Member 1228884027-Jul-16 6:41
Member 1228884027-Jul-16 6:41 
AnswerRe: Why this Error Contract Kind come on Pin
Richard Deeming27-Jul-16 7:24
mveRichard Deeming27-Jul-16 7:24 
QuestionFire onproperty change event on outer class. When a property of a inner class is updated Pin
rudedog127-Jul-16 4:47
rudedog127-Jul-16 4:47 
AnswerRe: Fire onproperty change event on outer class. When a property of a inner class is updated Pin
Richard MacCutchan27-Jul-16 4:53
mveRichard MacCutchan27-Jul-16 4:53 
AnswerRe: Fire onproperty change event on outer class. When a property of a inner class is updated Pin
BillWoodruff27-Jul-16 19:13
professionalBillWoodruff27-Jul-16 19:13 

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.