C
C#17mo ago
Mohammed85

Error idk how to fix

public class AppData : ObservableObject
{
private string accountToken;
private string userName;
private string userImageSource;
private string userId;

public string AccountToken { get => accountToken; set { accountToken = value; OnPropertyChanged(); } }

public string UserName { get => userName; set { userName = value; OnPropertyChanged(); } }

public string UserImageSource { get => userImageSource; set { userImageSource = value; OnPropertyChanged(); } }

public string UserId { get => userId; set { userId = value; OnPropertyChanged(); } }
}
public class AppData : ObservableObject
{
private string accountToken;
private string userName;
private string userImageSource;
private string userId;

public string AccountToken { get => accountToken; set { accountToken = value; OnPropertyChanged(); } }

public string UserName { get => userName; set { userName = value; OnPropertyChanged(); } }

public string UserImageSource { get => userImageSource; set { userImageSource = value; OnPropertyChanged(); } }

public string UserId { get => userId; set { userId = value; OnPropertyChanged(); } }
}
class ObservableObject : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;

protected void OnPropertyChanged([CallerMemberName] string name = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
}
class ObservableObject : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;

protected void OnPropertyChanged([CallerMemberName] string name = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
}
3 Replies
Thinker
Thinker17mo ago
ObservableObject is likely internal make it public instead
Hackmagician
Hackmagician17mo ago
make the ObservableObject class public
Mohammed85
Mohammed85OP17mo ago
thx
Want results from more Discord servers?
Add your server