C# Xamarin在活动之间传递数据

C# Xamarin在活动之间传递数据,c#,android,xamarin,C#,Android,Xamarin,我无法在两个活动之间共享数据: 活动1 homeButton.Click += delegate { var second = new Intent(this, typeof(SecondPage)); second.PutExtra("reg", "qwe"); StartActivity (typeof(SecondPage)); } Acitvity2(第二页) 仍然为空,有什么建议吗 首先,您应该传递您创建的意图: homeButton.Click +=

我无法在两个活动之间共享数据:

活动1

homeButton.Click += delegate {
    var second = new Intent(this, typeof(SecondPage));
    second.PutExtra("reg", "qwe");
    StartActivity (typeof(SecondPage));
    }
Acitvity2(第二页)


仍然为空,有什么建议吗

首先,您应该传递您创建的意图:

homeButton.Click += delegate {
    var second = new Intent(this, typeof(SecondPage));
    second.PutExtra("reg", "qwe");
    StartActivity (second);
    }
homeButton.Click += delegate {
    var second = new Intent(this, typeof(SecondPage));
    second.PutExtra("reg", "qwe");
    StartActivity (second);
    }