Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Store multiple values from Web Api into single string

$
0
0

Hi,

I am fetching data from web Api. I want to store multiple values to single string not variable. How can i achieve that.
Here is my code

     var stringmenu2 = await Task.Run(() => JsonConvert.SerializeObject(menu2));
                    var httpCon2 = new StringContent(stringmenu2, Encoding.UTF8, "application/json");

                    using (var Client2 = new HttpClient())
                    {
                        var httpRes2 = await Client2.PostAsync("http://localhost/api/mytest/GetBoothTypes", httpCon2);
                        if (httpRes2.Content != null)
                        {
                            var resContent1 = await httpRes2.Content.ReadAsStringAsync();
                            Boothtypes = JsonConvert.DeserializeObject<clsmybookingsList>(resContent1);
                            if (Boothtypes.Table != null)
                            {

                               //Here i want store values to single string 
                                String data = ?

                            }
                        }
                    }

Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>