How to: Change the Default Separator Character for Entering Multivalue Properties

This code example changes the default separator character for users entering multiple values for a property in the user interface. The comma is the default separator character. Administrators can also change the separator character directly in the user interface.

Replace servername and PublishedPapers with actual values before running the code example. Also add references to the following in your Microsoft Visual Studio project:

  • Microsoft.Office.Server

  • Microsoft.SharePoint

  • System.Web


using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Server;
using Microsoft.Office.Server.Administration;
using Microsoft.Office.Server.UserProfiles;
using Microsoft.SharePoint;
using System.Web;

namespace UserProfilesApp
    class Program
        static void Main(string[] args)

            using (SPSite site = new SPSite("http://servername"))
                ServerContext context =
                UserProfileManager profileManager = new
                PropertyCollection pc = profileManager.Properties;
                Property property = 
                property.Separator = MultiValueSeparator.Semicolon;

See Also


How to: Create Multivalue Properties
How to: Set Multiple Values to a Multivalue Property
How to: Create Properties with Choice Lists
How to: Set Privacy Policies for User Profile Properties