Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / clr / src / BCL / System / InvalidCastException.cs / 1 / InvalidCastException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: InvalidCastException ** ** ** Purpose: Exception class for bad cast conditions! ** ** =============================================================================*/ namespace System { using System; using System.Runtime.Serialization; [System.Runtime.InteropServices.ComVisible(true)] [Serializable()] public class InvalidCastException : SystemException { public InvalidCastException() : base(Environment.GetResourceString("Arg_InvalidCastException")) { SetErrorCode(__HResults.COR_E_INVALIDCAST); } public InvalidCastException(String message) : base(message) { SetErrorCode(__HResults.COR_E_INVALIDCAST); } public InvalidCastException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.COR_E_INVALIDCAST); } protected InvalidCastException(SerializationInfo info, StreamingContext context) : base(info, context) { } public InvalidCastException(String message, int errorCode) : base(message) { SetErrorCode(errorCode); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: InvalidCastException ** ** ** Purpose: Exception class for bad cast conditions! ** ** =============================================================================*/ namespace System { using System; using System.Runtime.Serialization; [System.Runtime.InteropServices.ComVisible(true)] [Serializable()] public class InvalidCastException : SystemException { public InvalidCastException() : base(Environment.GetResourceString("Arg_InvalidCastException")) { SetErrorCode(__HResults.COR_E_INVALIDCAST); } public InvalidCastException(String message) : base(message) { SetErrorCode(__HResults.COR_E_INVALIDCAST); } public InvalidCastException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.COR_E_INVALIDCAST); } protected InvalidCastException(SerializationInfo info, StreamingContext context) : base(info, context) { } public InvalidCastException(String message, int errorCode) : base(message) { SetErrorCode(errorCode); } } } // 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
- StringFormat.cs
- SystemIPInterfaceProperties.cs
- QueryMath.cs
- DataControlFieldHeaderCell.cs
- ClrProviderManifest.cs
- NativeRecognizer.cs
- IISMapPath.cs
- _HeaderInfo.cs
- ClientBuildManagerCallback.cs
- MetadataException.cs
- ListenerElementsCollection.cs
- TrustLevelCollection.cs
- MemberProjectionIndex.cs
- RuntimeCompatibilityAttribute.cs
- Trace.cs
- SmiEventSink.cs
- DescendantOverDescendantQuery.cs
- ArrowControl.xaml.cs
- TypeBuilder.cs
- EntityDataSourceReferenceGroup.cs
- Condition.cs
- EventLogException.cs
- WrappingXamlSchemaContext.cs
- FilteredDataSetHelper.cs
- PointAnimationClockResource.cs
- TextServicesCompartmentContext.cs
- MemoryStream.cs
- SliderAutomationPeer.cs
- Component.cs
- ToolStripSeparatorRenderEventArgs.cs
- UIElementIsland.cs
- SqlDataSourceAdvancedOptionsForm.cs
- NavigationPropertyEmitter.cs
- bidPrivateBase.cs
- PassportAuthentication.cs
- EventDriven.cs
- GridView.cs
- SplitterCancelEvent.cs
- FormattedTextSymbols.cs
- InvokeMethodActivity.cs
- CallSiteHelpers.cs
- SHA1CryptoServiceProvider.cs
- EndpointDiscoveryElement.cs
- BeginStoryboard.cs
- Util.cs
- DisplayMemberTemplateSelector.cs
- DataViewSetting.cs
- TemplatedMailWebEventProvider.cs
- RootContext.cs
- GraphicsPathIterator.cs
- WebSysDisplayNameAttribute.cs
- CustomExpressionEventArgs.cs
- WebPartHelpVerb.cs
- PrtCap_Base.cs
- _ConnectionGroup.cs
- wmiprovider.cs
- SourceElementsCollection.cs
- MultiplexingDispatchMessageFormatter.cs
- SystemMulticastIPAddressInformation.cs
- SchemaExporter.cs
- SQLSingleStorage.cs
- SimpleWebHandlerParser.cs
- AutomationPropertyInfo.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- AssemblyAssociatedContentFileAttribute.cs
- Quad.cs
- MetadataArtifactLoaderCompositeFile.cs
- InvalidOperationException.cs
- Image.cs
- SplineQuaternionKeyFrame.cs
- MenuItemCollection.cs
- TextEditorCharacters.cs
- ImageMap.cs
- ProfileService.cs
- OSEnvironmentHelper.cs
- DataTableMappingCollection.cs
- Schedule.cs
- CellParaClient.cs
- QilName.cs
- RoutedEvent.cs
- SafeUserTokenHandle.cs
- XmlSortKey.cs
- SettingsSection.cs
- StructuralType.cs
- PreProcessInputEventArgs.cs
- CardSpaceShim.cs
- StrongNameHelpers.cs
- RegisteredScript.cs
- SqlDataSource.cs
- PersonalizableAttribute.cs
- TableLayout.cs
- XmlElementCollection.cs
- FileSystemWatcher.cs
- SecurityDescriptor.cs
- WebControl.cs
- ElementNotEnabledException.cs
- PropertyMap.cs
- ConstraintCollection.cs
- SQLBytesStorage.cs
- MailMessageEventArgs.cs