Sharepoint 如何在CSOM中处理FieldCurrency以使用枚举设置货币格式

Sharepoint 如何在CSOM中处理FieldCurrency以使用枚举设置货币格式,sharepoint,sharepoint-online,csom,Sharepoint,Sharepoint Online,Csom,如何设置货币格式,如₹ 123456.00(印度)。我们可以使用Sharepoint Online进行设置。我想知道如何使用CSOM设置它。是否有任何enum类型可设置CurrencyLocaleId。多谢各位 using (ClientContext context = new ClientContext("https://rohith.sharepoint.com/sites/site")) { context.Credentials = new Sh

如何设置货币格式,如₹ 123456.00(印度)。我们可以使用Sharepoint Online进行设置。我想知道如何使用CSOM设置它。是否有任何
enum
类型可设置
CurrencyLocaleId
。多谢各位

using (ClientContext context = new ClientContext("https://rohith.sharepoint.com/sites/site"))
        {
            context.Credentials = new SharePointOnlineCredentials(username, password);
            ListCreationInformation listinfo = new ListCreationInformation();
            List list = context.Web.Lists.GetByTitle("Custom List");
            context.Load(list);

            FieldCurrency fieldCurrency = context.CastTo<FieldCurrency>(list.AddField("Price", "Currency"));
            //Here how to set Currency Format
            fieldCurrency.CurrencyLocaleId = 1081;

            fieldCurrency.Update();
            ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();

            ListItem listItem = list.AddItem(itemCreateInfo);
            listItem["Title"] = "Books";
            listItem["Quentity"] = 12;
            listItem["Price"] = 100;

            listItem.Update();
            context.ExecuteQuery();
        }
使用(ClientContext=newclientcontext(“https://rohith.sharepoint.com/sites/site"))
{
context.Credentials=新的SharePointOnlineCredentials(用户名、密码);
ListCreationInformation listinfo=新建ListCreationInformation();
列表=context.Web.Lists.GetByTitle(“自定义列表”);
加载(列表);
FieldCurrency FieldCurrency=context.CastTo(list.AddField(“价格”、“货币”));
//这里介绍如何设置货币格式
fieldCurrency.CurrencyLocaleId=1081;
fieldCurrency.Update();
ListItemCreationInformation itemCreateInfo=新建ListItemCreationInformation();
ListItem ListItem=list.AddItem(itemCreateInfo);
listItem[“标题”]=“书籍”;
listItem[“Quentity”]=12;
列表项[“价格”]=100;
Update();
context.ExecuteQuery();
}