System.Globalization.CompareInfo.CompareInfo C# (CSharp) Method

CompareInfo() private method

private CompareInfo ( GlobalizationAssembly ga, int culture ) : System
ga GlobalizationAssembly
culture int
return System
        internal unsafe CompareInfo(GlobalizationAssembly ga, int culture) {
            if (culture < 0) {
                throw new ArgumentOutOfRangeException("culture", Environment.GetResourceString("ArgumentOutOfRange_NeedPosNum"));
            }
            // Get the Win32 LCID used to create NativeCompareInfo, which only takes Win32 LCID.
            this.m_sortingLCID = GetSortingLCID(culture);

            // If version support is enabled, InitializeCompareInfo should use ga instead of getting the default 
            // instance.

            // Call to the native side to create/get the corresponding native C++ SortingTable for this culture.
            // The returned value is a 32-bit pointer to the native C++ SortingTable instance.  
            // We cache this pointer so that we can call methods of the SortingTable directly.
            if (!IsSynthetic)
            {
                m_pSortingTable = InitializeCompareInfo(GlobalizationAssembly.DefaultInstance.pNativeGlobalizationAssembly, this.m_sortingLCID);
            }
            // Since this.m_sortingLCID can be different from the passed-in culture in the case of neutral cultures, store the culture ID in a different place.
            this.culture = culture;

        }