Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Globalization / CultureNotFoundException.cs / 1305376 / CultureNotFoundException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Globalization { using System; using System.Runtime.Serialization; using System.Threading; using System.Diagnostics.Contracts; [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class CultureNotFoundException : ArgumentException, ISerializable { private string m_invalidCultureName; // unrecognized culture name private Nullablem_invalidCultureId; // unrecognized culture Lcid public CultureNotFoundException() : base(DefaultMessage) { } public CultureNotFoundException(String message) : base(message) { } public CultureNotFoundException(String paramName, String message) : base(message, paramName) { } public CultureNotFoundException(String message, Exception innerException) : base(message, innerException) { } public CultureNotFoundException(String paramName, int invalidCultureId, String message) : base(message, paramName) { m_invalidCultureId = invalidCultureId; } public CultureNotFoundException(String message, int invalidCultureId, Exception innerException) : base(message, innerException) { m_invalidCultureId = invalidCultureId; } public CultureNotFoundException(String paramName, string invalidCultureName, String message) : base(message, paramName) { m_invalidCultureName = invalidCultureName; } public CultureNotFoundException(String message, string invalidCultureName, Exception innerException) : base(message, innerException) { m_invalidCultureName = invalidCultureName; } [System.Security.SecuritySafeCritical] // auto-generated protected CultureNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { m_invalidCultureId = (Nullable ) info.GetValue("InvalidCultureId", typeof(Nullable )); m_invalidCultureName = (string) info.GetValue("InvalidCultureName", typeof(string)); } [System.Security.SecurityCritical] // auto-generated_required public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info==null) { throw new ArgumentNullException("info"); } Contract.EndContractBlock(); base.GetObjectData(info, context); info.AddValue("InvalidCultureId", m_invalidCultureId, typeof(Nullable )); info.AddValue("InvalidCultureName", m_invalidCultureName, typeof(string)); } public virtual Nullable InvalidCultureId { get { return m_invalidCultureId; } } public virtual string InvalidCultureName { get { return m_invalidCultureName; } } private static String DefaultMessage { get { return Environment.GetResourceString("Argument_CultureNotSupported"); } } private String FormatedInvalidCultureId { get { if (InvalidCultureId != null) { return String.Format(CultureInfo.InvariantCulture, "{0} (0x{0:x4})", (int)InvalidCultureId); } return InvalidCultureName; } } public override String Message { get { String s = base.Message; if (m_invalidCultureId != null || m_invalidCultureName != null) { String valueMessage = Environment.GetResourceString("Argument_CultureInvalidIdentifier", FormatedInvalidCultureId); if (s == null) return valueMessage; return s + Environment.NewLine + valueMessage; } return s; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HtmlValidatorAdapter.cs
- CatalogPart.cs
- DbConnectionPool.cs
- ExpandableObjectConverter.cs
- ContentValidator.cs
- ClientRolePrincipal.cs
- ComPlusTypeValidator.cs
- Random.cs
- _SafeNetHandles.cs
- SapiRecoInterop.cs
- StyleModeStack.cs
- PrinterResolution.cs
- CollectionEditorDialog.cs
- DesigntimeLicenseContextSerializer.cs
- HtmlAnchor.cs
- MappingSource.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- CfgSemanticTag.cs
- BaseTemplateParser.cs
- Policy.cs
- ParseHttpDate.cs
- TargetControlTypeCache.cs
- XmlTextWriter.cs
- RegionIterator.cs
- X509SecurityTokenProvider.cs
- StandardCommandToolStripMenuItem.cs
- PartialClassGenerationTaskInternal.cs
- TreeWalkHelper.cs
- CompiledIdentityConstraint.cs
- WebPartsPersonalization.cs
- CollectionViewGroupInternal.cs
- GenericTypeParameterBuilder.cs
- Int64AnimationUsingKeyFrames.cs
- DataGridCheckBoxColumn.cs
- SmiMetaData.cs
- TextSegment.cs
- ZoomPercentageConverter.cs
- IDQuery.cs
- CharacterHit.cs
- StateMachineWorkflowDesigner.cs
- SQLDateTime.cs
- PathHelper.cs
- EpmTargetPathSegment.cs
- DesignUtil.cs
- MsmqIntegrationProcessProtocolHandler.cs
- Variant.cs
- XsdDateTime.cs
- EventProxy.cs
- Sql8ExpressionRewriter.cs
- ColorAnimationBase.cs
- EntityContainer.cs
- BaseParaClient.cs
- CodeTypeConstructor.cs
- Point.cs
- Monitor.cs
- _AutoWebProxyScriptWrapper.cs
- IriParsingElement.cs
- CfgRule.cs
- SafeMILHandle.cs
- TableLayoutRowStyleCollection.cs
- ResourceContainer.cs
- DbDeleteCommandTree.cs
- PersistenceParticipant.cs
- ListBox.cs
- OdbcTransaction.cs
- InertiaExpansionBehavior.cs
- InputLangChangeEvent.cs
- GlobalDataBindingHandler.cs
- RichTextBox.cs
- XmlAnyElementAttribute.cs
- AsymmetricSignatureFormatter.cs
- PrtCap_Reader.cs
- FlagPanel.cs
- PageHandlerFactory.cs
- TdsEnums.cs
- CompiledIdentityConstraint.cs
- SamlAttributeStatement.cs
- CodeTypeConstructor.cs
- SafeReversePInvokeHandle.cs
- ClonableStack.cs
- InternalsVisibleToAttribute.cs
- HttpClientCertificate.cs
- DependentList.cs
- InstanceCreationEditor.cs
- TextParagraphView.cs
- DocumentViewerHelper.cs
- NameValueConfigurationElement.cs
- DefaultPropertyAttribute.cs
- XmlSchemaAll.cs
- ControlBuilderAttribute.cs
- baseaxisquery.cs
- ApplicationTrust.cs
- RectangleConverter.cs
- ServiceDesigner.cs
- KeyInfo.cs
- Vector3dCollection.cs
- CommandLineParser.cs
- RegexParser.cs
- StubHelpers.cs
- ReturnValue.cs