gpt4 book ai didi

c# - 命名空间不能直接包含成员?

转载 作者:太空狗 更新时间:2023-10-30 00:18:23 25 4
gpt4 key购买 nike

<分区>

我有一个问题。我一直在关注一个教程,这样我就可以学习使用 Xamarin 进行编程。那么现在我有这个错误行,我已经写在标题中了。这是给大家的代码;

using System.Collections.ObjectModel;
using UIKit;

namespace freesongsforme
{
static void Main(string[] args)
{
var listView = new ListView();
var myTrainers = new ObservableCollection<string>()
{
"Song 1",
"Song 2",
};

listView.ItemsSource = mySongs;

myTrainers.Add("Songsr");
}

“主要”部分被标记为错误。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com