Field クラス

Represents a field in a list on a Microsoft SharePoint Foundation Web site.

継承階層

System.Object
  Microsoft.SharePoint.Client.ClientObject
    Microsoft.SharePoint.Client.Field
      

名前空間:  Microsoft.SharePoint.Client
アセンブリ:   Microsoft.SharePoint.Client.Silverlight (Microsoft.SharePoint.Client.Silverlight.dll 内);  Microsoft.SharePoint.Client.Phone (Microsoft.SharePoint.Client.Phone.dll 内)  Microsoft.SharePoint.Client (Microsoft.SharePoint.Client.dll 内)

構文

'宣言
Public Class Field _
    Inherits ClientObject
'使用
Dim instance As Field
public class Field : ClientObject

注釈

A field is an element of a list or content type schema that specifies a property that is tracked for a list item. A field has an Internal Name, which specifies an identifier for the field. A field internal name is unique among other fields within a list and cannot contain spaces. A field has an Id, which is a GUID.A field has a specified field type. A field also contains state information for settings and additional metadata specified by the field type.

This code example gets a specified field, creates a description for the field, and displays the field title and new description.

using System;
using Microsoft.SharePoint.Client;

namespace Microsoft.SDK.SharePointFoundation.Samples
{
    class FieldExample
    {
        static void Main()
        {
            string siteUrl = "http://MyServer/sites/MySiteCollection";

            ClientContext clientContext = new ClientContext(siteUrl);
            Web site = clientContext.Web;
            List taskList = site.Lists.GetByTitle("Tasks");

            FieldCollection collField = taskList.Fields;
            Field oneField = collField.GetByInternalNameOrTitle("Title");
            oneField.Description = "MyNewFieldDescription";
            oneField.Update();
            
            clientContext.Load(collField);
            clientContext.Load(oneField);
            clientContext.ExecuteQuery();

            string fieldInfo = "Field Title: " + oneField.Title + "\n" + 
               "Description: " + oneField.Description + "\n";
            Console.WriteLine(fieldInfo);

        }

    }
}

スレッド セーフ

この型のパブリック static (Visual Basic のShared ) メンバーはいずれもスレッド セーフです。インスタンス メンバーはスレッド セーフになるという保証はありません。

関連項目

参照先

Field メンバー

Microsoft.SharePoint.Client 名前空間

継承階層

System.Object
  Microsoft.SharePoint.Client.ClientObject
    Microsoft.SharePoint.Client.Field
      Microsoft.SharePoint.Client.FieldCalculated
      Microsoft.SharePoint.Client.FieldComputed
      Microsoft.SharePoint.Client.FieldDateTime
      Microsoft.SharePoint.Client.FieldGeolocation
      Microsoft.SharePoint.Client.FieldGuid
      Microsoft.SharePoint.Client.FieldLookup
      Microsoft.SharePoint.Client.FieldMultiChoice
      Microsoft.SharePoint.Client.FieldMultiLineText
      Microsoft.SharePoint.Client.FieldNumber
      Microsoft.SharePoint.Client.FieldText
      Microsoft.SharePoint.Client.FieldUrl