如何检查身份验证c#firebase
我有一个问题,关于如何检查身份验证c#firebase,c#,firebase,firebase-authentication,C#,Firebase,Firebase Authentication,我有一个问题,关于对象引用未设置为此代码中对象的实例: private async void ButtonLogin_Click(object sender, EventArgs e) { try { FirebaseResponse firebaseResponse = await client.GetTaskAsync("User/" + textBoxUsername.Text);
对象引用未设置为此代码中对象的实例:
private async void ButtonLogin_Click(object sender, EventArgs e)
{
try
{
FirebaseResponse firebaseResponse = await client.GetTaskAsync("User/" + textBoxUsername.Text);
DataLogin datar = firebaseResponse.ResultAs<DataLogin>();
if (textBoxPassword.Text == datar.password)
{
MessageBox.Show("Success");
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private async void按钮登录单击(对象发送方,事件参数e)
{
尝试
{
FirebaseResponse FirebaseResponse=wait client.GetTaskAsync(“User/”+textBoxUsername.Text);
DataLogin datar=firebaseress.ResultAs();
if(textBoxPassword.Text==datar.password)
{
MessageBox.Show(“成功”);
}
}
捕获(例外情况除外)
{
MessageBox.Show(例如Message);
}
}
具体是哪个对象?AFAIK异常包含该信息。DataLogin datar=firebaseress.ResultAs();请检查firebaseResponse
是否不为空。