Please check the following code
RetrieveOptionSetRequest req =
new RetrieveOptionSetRequest
{
//my global optionset's name
Name = "connectionrole_category"
};
// Execute the request.
RetrieveOptionSetResponse retrieveOptionSetResponse =
(RetrieveOptionSetResponse)slos.Execute(req);
// Access the retrieved OptionSetMetadata.
OptionSetMetadata retrievedOptionSetMetadata =
(OptionSetMetadata)retrieveOptionSetResponse.OptionSetMetadata;
// Get the current options list for the retrieved attribute.
OptionMetadata[] optionList =
retrievedOptionSetMetadata.Options.ToArray();
For More help please check the blog of Jamie Miley
http://mileyja.blogspot.com/2011/07/retrieve-optionset-in-jscript-or-net-in.html
I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.
Mubasher Sharif
Check out my about.me profile!
http://mubashersharif.blogspot.com
Linked-In Profile
Follow me on Twitter!