Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / VersionConverter.cs / 1305376 / VersionConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.ComponentModel; using System.Configuration; using System.Globalization; internal sealed class VersionConverter : ConfigurationConverterBase { public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { return new Version((string)value); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { var version = (Version)value; return version.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.ComponentModel; using System.Configuration; using System.Globalization; internal sealed class VersionConverter : ConfigurationConverterBase { public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { return new Version((string)value); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { var version = (Version)value; return version.ToString(); } } } // 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
- ScriptingSectionGroup.cs
- DesignerSerializationOptionsAttribute.cs
- UICuesEvent.cs
- ContainerVisual.cs
- VBCodeProvider.cs
- PkcsMisc.cs
- AddInContractAttribute.cs
- EntityEntry.cs
- SrgsText.cs
- LateBoundBitmapDecoder.cs
- Route.cs
- ReflectionTypeLoadException.cs
- Site.cs
- ChangeBlockUndoRecord.cs
- HashRepartitionStream.cs
- CultureInfoConverter.cs
- TextEditorCharacters.cs
- TextParagraphCache.cs
- ListenerSingletonConnectionReader.cs
- XamlBrushSerializer.cs
- SourceLineInfo.cs
- UnsafeNativeMethods.cs
- BadImageFormatException.cs
- StylusPointDescription.cs
- ContextMenuService.cs
- BoolExpression.cs
- PackWebRequest.cs
- ClientSponsor.cs
- TargetInvocationException.cs
- ComponentEditorForm.cs
- DefaultParameterValueAttribute.cs
- RegexBoyerMoore.cs
- FileDialog_Vista_Interop.cs
- IndexedSelectQueryOperator.cs
- VisualProxy.cs
- DoubleKeyFrameCollection.cs
- WinFormsUtils.cs
- HttpListenerContext.cs
- TextDecorationCollection.cs
- path.cs
- IISUnsafeMethods.cs
- InsufficientMemoryException.cs
- SQLBinaryStorage.cs
- SequentialWorkflowRootDesigner.cs
- GroupItemAutomationPeer.cs
- ToolboxDataAttribute.cs
- BamlMapTable.cs
- XmlNodeChangedEventManager.cs
- CookielessHelper.cs
- Formatter.cs
- HealthMonitoringSectionHelper.cs
- EntityDataSourceDataSelection.cs
- OdbcPermission.cs
- ChangeTracker.cs
- ErrorLog.cs
- relpropertyhelper.cs
- StatementContext.cs
- XmlWriterSettings.cs
- ArgumentsParser.cs
- InputLangChangeEvent.cs
- DesignerDataSourceView.cs
- InvokePatternIdentifiers.cs
- XmlMemberMapping.cs
- ChangePasswordAutoFormat.cs
- AppDomainManager.cs
- RenderData.cs
- FragmentQueryProcessor.cs
- NetSectionGroup.cs
- ChangePassword.cs
- XmlSchemaSimpleContentExtension.cs
- BooleanAnimationUsingKeyFrames.cs
- ProxyAttribute.cs
- ReversePositionQuery.cs
- PngBitmapDecoder.cs
- Subset.cs
- KernelTypeValidation.cs
- MetadataConversionError.cs
- ArrayConverter.cs
- cache.cs
- XamlTypeMapper.cs
- DurationConverter.cs
- DesignerLabelAdapter.cs
- ConfigurationValidatorBase.cs
- TargetInvocationException.cs
- DataPagerFieldCommandEventArgs.cs
- ComPlusThreadInitializer.cs
- DataRelationCollection.cs
- TextEncodedRawTextWriter.cs
- IIS7WorkerRequest.cs
- XmlAnyAttributeAttribute.cs
- ConfigXmlDocument.cs
- FileDialog.cs
- TimeoutException.cs
- SamlSecurityTokenAuthenticator.cs
- ListQueryResults.cs
- ViewManager.cs
- Stroke2.cs
- EmptyEnumerator.cs
- unitconverter.cs
- ComponentRenameEvent.cs