简体   繁体   中英

An exception of type 'System.Reflection.TargetInvocationException' occurred in System.ni.dll but was not handled in user code

This is the error which Visual Studio gives while running the following code for Windows Phone 8

void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)

        {

                MessageBox.Show(e.Result);
                var rootObject = JsonConvert.DeserializeObject<RootObject>(e.Result);
                var data = rootObject.trueScore;
                score = data;
        }

Please help! :(

The first thing to do is to catch the exception and look at the .InnerException.

At a guess: your type, or some key member of the type, is non-public

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM