NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

CultureInfo.GetServiceObject

Returns a service object for the current instance.

[Visual Basic]
Overridable Public Function GetServiceObject( _
   ByVal service As Type _
) As Object
[C#]
public virtual object GetServiceObject(
   Type service
);
[C++]
public: virtual Object* GetServiceObject(
   Type* service
);
[JScript]
public function GetServiceObject(
   service : Type
) : Object;

Parameters

service
A Type object representing the type of the[a15] service object to get. This function supports only NumberFormatInfo and DateTimeFormatInfo Type objects.

Return Value

A NumberFormatInfo object containing the default number format information for this CultureInfo if service is the Type object for the NumberFormatInfo class. If service is the Type object for the DateTimeFormatInfo class, a DateTimeFormatInfo object containing the default date and time format information for the current CultureInfo is returned. Otherwise, null is returned.

Remarks

This method is invoked by the Format(String, IServiceObjectProvider) method supported by the base data types when the current instance is passed as the IServiceObjectProvider.

This method implements IServiceObjectProvider.GetServiceObject.

See Also

CultureInfo Class | CultureInfo Members | System.Globalization Namespace