Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / PrimaryKeyTypeConverter.cs / 1305376 / PrimaryKeyTypeConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System.ComponentModel; using System.Globalization; using System.Data; internal sealed class PrimaryKeyTypeConverter : ReferenceConverter { // converter classes should have public ctor public PrimaryKeyTypeConverter() : base(typeof(DataColumn[])) { } public override bool GetPropertiesSupported(ITypeDescriptorContext context) { return false; } public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { if (destinationType == typeof(String)) { return true; } return base.CanConvertTo(context, destinationType); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == null) { throw new ArgumentNullException("destinationType"); } if (destinationType == typeof(string)) { return (new DataColumn[] {}).GetType().Name; } return base.ConvertTo(context, culture, value, destinationType); } } } // 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
- SecureStringHasher.cs
- IndependentAnimationStorage.cs
- Expressions.cs
- OracleNumber.cs
- HttpListenerContext.cs
- SqlStatistics.cs
- SqlProcedureAttribute.cs
- SpeechDetectedEventArgs.cs
- KoreanLunisolarCalendar.cs
- ListBoxChrome.cs
- MenuItemBinding.cs
- SymLanguageVendor.cs
- SelectionHighlightInfo.cs
- GlyphRun.cs
- Label.cs
- Slider.cs
- ProviderConnectionPointCollection.cs
- ChineseLunisolarCalendar.cs
- RoutedPropertyChangedEventArgs.cs
- Facet.cs
- WebPartCancelEventArgs.cs
- ProjectionCamera.cs
- SamlSubjectStatement.cs
- RepeatButtonAutomationPeer.cs
- TextDecorationCollection.cs
- NullableConverter.cs
- CalendarData.cs
- FileEnumerator.cs
- SystemIPv4InterfaceProperties.cs
- TableColumn.cs
- SectionInformation.cs
- ConnectionPoolRegistry.cs
- SoundPlayerAction.cs
- EnumBuilder.cs
- XmlSerializationReader.cs
- SerializableAttribute.cs
- FigureParaClient.cs
- GlobalProxySelection.cs
- BigInt.cs
- QuaternionValueSerializer.cs
- ScaleTransform3D.cs
- OdbcTransaction.cs
- Expression.cs
- WebEventTraceProvider.cs
- TablePattern.cs
- HwndHost.cs
- NativeMethodsCLR.cs
- SimpleApplicationHost.cs
- LicenseContext.cs
- IdSpace.cs
- MatrixUtil.cs
- SubclassTypeValidator.cs
- SimpleHandlerFactory.cs
- SmiContextFactory.cs
- HandlerBase.cs
- XmlNamedNodeMap.cs
- SchemaInfo.cs
- OutOfProcStateClientManager.cs
- SoapHeaders.cs
- IgnorePropertiesAttribute.cs
- DiscreteKeyFrames.cs
- sqlinternaltransaction.cs
- Point4D.cs
- CaseInsensitiveComparer.cs
- ItemCheckEvent.cs
- DocumentOrderQuery.cs
- ColorContext.cs
- ThicknessConverter.cs
- XamlReader.cs
- FormParameter.cs
- StringFormat.cs
- RenameRuleObjectDialog.cs
- HttpVersion.cs
- OleDbRowUpdatingEvent.cs
- BrowserDefinitionCollection.cs
- EventManager.cs
- BindingOperations.cs
- Rotation3D.cs
- SpecialFolderEnumConverter.cs
- ConfigurationStrings.cs
- ScriptServiceAttribute.cs
- OutputScopeManager.cs
- IdnElement.cs
- ContextStaticAttribute.cs
- Simplifier.cs
- hresults.cs
- AsymmetricKeyExchangeDeformatter.cs
- BitmapDecoder.cs
- Int16Converter.cs
- RemotingAttributes.cs
- ValidatingReaderNodeData.cs
- ImageKeyConverter.cs
- CharacterMetricsDictionary.cs
- MemoryMappedFile.cs
- LinqExpressionNormalizer.cs
- EditorAttribute.cs
- SmtpNtlmAuthenticationModule.cs
- RectangleConverter.cs
- SHA512.cs
- StreamingContext.cs