System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject C# (CSharp) Method

ReadObject() public method

public ReadObject ( Stream stream ) : object
stream Stream
return object
        public override object ReadObject(Stream stream)
        {
            return _serializer.ReadObject(stream);
        }

Same methods

DataContractJsonSerializer::ReadObject ( System stream ) : object
DataContractJsonSerializer::ReadObject ( System reader, bool verifyObjectName ) : object
DataContractJsonSerializer::ReadObject ( XmlDictionaryReader reader ) : object
DataContractJsonSerializer::ReadObject ( XmlDictionaryReader reader, bool verifyObjectName ) : object
DataContractJsonSerializer::ReadObject ( XmlReader reader ) : object
DataContractJsonSerializer::ReadObject ( XmlReader reader, bool verifyObjectName ) : object

Usage Example

        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            if (CountryPhoneCode.SelectedItem != null)
            {
                var _id = Guid.NewGuid().ToString("N");
                var _countryPhoneCode = (CountryPhoneCode.SelectedItem as Country).PhoneCode;
                var _countryName = (CountryPhoneCode.SelectedItem as Country).CountryName;
                var _name = FullName.Text;
                var _phoneNumber = PhoneNumber.Text;
                var _password = Password.Password;

                var client = new HttpClient()
                {
                    BaseAddress = new Uri("http://yochat.azurewebsites.net/chat/")
                };

                var json = await client.GetStringAsync("createuser?id=" + _id + "&fullName=" + _name + "&password="******"&phoneNumber=" + _phoneNumber + "&countryPhoneCode=" + _countryPhoneCode);

                var serializer = new DataContractJsonSerializer(typeof(User));
                var ms = new MemoryStream();
                var user = serializer.ReadObject(ms) as User;

                Frame.Navigate(typeof(MainPage), user);
            }
            else
            {
                MessageDialog dialog = new MessageDialog("Lütfen Ülkenizi Seçiniz!");
                await dialog.ShowAsync();
            }
        }
All Usage Examples Of System.Runtime.Serialization.Json.DataContractJsonSerializer::ReadObject