CultureCode Property
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Gets or sets the culture code of the current instance.
Namespace: Microsoft.CommerceServer.Marketing
Assembly: Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)
Syntax
'Declaration
Public Property CultureCode As String
'Usage
Dim instance As LanguageString
Dim value As String
value = instance.CultureCode
instance.CultureCode = value
public string CultureCode { get; set; }
public:
property String^ CultureCode {
String^ get ();
void set (String^ value);
}
public function get CultureCode () : String
public function set CultureCode (value : String)
Property Value
Type: System..::.String
The culture code of the current instance. May not be nullNothingnullptra null reference (Nothing in Visual Basic). Must be one of the valid codes, as described by CultureInfo.
Exceptions
Exception | Condition |
---|---|
PropertyNullValidationException | An attempt was made to set the CultureCode to nullNothingnullptra null reference (Nothing in Visual Basic). |
StringLengthValidationException | An attempt was made to set the CultureCode to a string that was too long or to an empty string. |
ArgumentException | An attempt was made to set the CultureCode to a string that is not a valid CultureCode. |
Remarks
The maximum length is 17 characters. When setting this property, leading and/or trailing whitespace is removed. CultureCode must be unique and is the key in the LanguageStringCollection.
An example: "en" or "en-US", or "ja-JP".
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.