C
C#2y 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
Thinker2y ago
ObservableObject is likely internal make it public instead
Hackmagician
Hackmagician2y ago
make the ObservableObject class public
Mohammed85
Mohammed85OP2y ago
thx

Did you find this page helpful?