Вот моя функция, которая работает, но я могу выяснить, как конкретно отображать заголовок элемента в списке.
private void button1_Click(object sender, EventArgs e)
{
using (ClientContext ctx = new ClientContext("myurl"))
{
ctx.Credentials = CredentialsFactory.SharePointCredentials.CreateCredentials(txtUsername.Text, txtPassword.Text, CredentialsFactory.SharePointCredentials.SharePointAuthentication.SharePointOnline);
List clinicsList = ctx.Web.Lists.GetByTitle("Clinics");
CamlQuery query = CamlQuery.CreateAllItemsQuery(1000);
ListItemCollection clinics = clinicsList.GetItems(query);
ctx.Load(clinics);
ctx.ExecuteQuery();
listBox1.DataSource = clinics.ToList();
}
}
Я уверен, что это действительно просто!Заранее спасибо!
Вот скриншот с выводом.
![enter image description here](https://i.stack.imgur.com/2DlPV.png)