C# CSOM正在查找SharePoint表单上显示的列/字段列表

C# CSOM正在查找SharePoint表单上显示的列/字段列表,c#,sharepoint,properties,content-type,csom,C#,Sharepoint,Properties,Content Type,Csom,我想获得内容类型的字段列表。我希望得到一个列表,只显示在编辑表单上的字段或编辑上传文档的属性 下面的代码将获得字段列表,但我无法区分编辑表单/显示表单上刚刚显示的字段 我想我需要看看FieldLink集合,因为它应该有一个ShowInForm属性。但该“ShowInForm”不是该集合中的有效属性 我也做了一些谷歌搜索,但我可以看到如何设置showinform,但不能看到如何获取字段的值 如果你有任何建议,请告诉我 ClientContext=新的ClientContext(站点) 根据mt测试

我想获得内容类型的字段列表。我希望得到一个列表,只显示在编辑表单上的字段或编辑上传文档的属性

下面的代码将获得字段列表,但我无法区分编辑表单/显示表单上刚刚显示的字段

我想我需要看看FieldLink集合,因为它应该有一个ShowInForm属性。但该“ShowInForm”不是该集合中的有效属性

我也做了一些谷歌搜索,但我可以看到如何设置showinform,但不能看到如何获取字段的值

如果你有任何建议,请告诉我

ClientContext=新的ClientContext(站点)


根据mt测试,ShowInForm的值位于field.SchemaXml属性中


我的field.SchemaXml中没有该属性。我在SharePoint 2013上。这就是我所拥有的:
        //// Get the content type using ID: 0x01003D7B5A54BF843D4381F54AB9D229F98A - is the ID of the "Custom" content Type
        string contentTypeID = GetContentTypeGUID(contentType, site);
            ContentType ct = clientContext.Web.ContentTypes.GetById(contentTypeID);

            //// Gets a value that specifies the collection of fields for the content type
            FieldCollection fieldColl = ct.Fields;
            clientContext.Load(fieldColl);
            clientContext.ExecuteQuery();

        //// Display the field name

            foreach (Field oField in fieldColl)
            {
               // Code for each Field
      }