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
- RelatedPropertyManager.cs
- TextOptionsInternal.cs
- SvcMapFileLoader.cs
- ReflectionHelper.cs
- ManipulationDeltaEventArgs.cs
- Panel.cs
- SafeArchiveContext.cs
- XsltSettings.cs
- InkCanvasSelection.cs
- MachineSettingsSection.cs
- DataRelationCollection.cs
- FontFamilyValueSerializer.cs
- SoapServerProtocol.cs
- LocalFileSettingsProvider.cs
- RawStylusActions.cs
- UpdateTracker.cs
- OdbcStatementHandle.cs
- SynchronizedInputProviderWrapper.cs
- WebPart.cs
- XmlRawWriter.cs
- ResourcesChangeInfo.cs
- WebBrowserContainer.cs
- DbMetaDataCollectionNames.cs
- PropVariant.cs
- ScrollChangedEventArgs.cs
- WebServiceHostFactory.cs
- TypeSystemHelpers.cs
- DataSetMappper.cs
- PropertyReferenceSerializer.cs
- EventSinkActivityDesigner.cs
- DataGridViewSelectedCellCollection.cs
- WeakReference.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- WindowsTreeView.cs
- PenThreadWorker.cs
- ListItemsCollectionEditor.cs
- InstancePersistenceCommandException.cs
- HtmlListAdapter.cs
- AuthorizationSection.cs
- PageParserFilter.cs
- URLString.cs
- GridEntry.cs
- XmlSchemaChoice.cs
- ApplicationSecurityManager.cs
- ConfigPathUtility.cs
- ProfilePropertySettingsCollection.cs
- WebConfigurationHostFileChange.cs
- ExpressionBuilderContext.cs
- XsltOutput.cs
- Composition.cs
- NavigationFailedEventArgs.cs
- PropertyNames.cs
- DynamicControl.cs
- PropertyEmitterBase.cs
- LinqTreeNodeEvaluator.cs
- PersonalizationStateQuery.cs
- EventLogWatcher.cs
- DataFieldConverter.cs
- ComponentResourceKeyConverter.cs
- SimpleApplicationHost.cs
- WeakReadOnlyCollection.cs
- ItemCheckedEvent.cs
- SizeAnimationBase.cs
- CompilerScopeManager.cs
- Label.cs
- streamingZipPartStream.cs
- SoapSchemaMember.cs
- NominalTypeEliminator.cs
- hebrewshape.cs
- LocatorGroup.cs
- MaskedTextBoxDesigner.cs
- PnrpPermission.cs
- XmlQuerySequence.cs
- XmlWrappingWriter.cs
- XPathBinder.cs
- DBConnectionString.cs
- HttpProfileGroupBase.cs
- TypedOperationInfo.cs
- UnmanagedMarshal.cs
- Policy.cs
- ContextMarshalException.cs
- InvariantComparer.cs
- Solver.cs
- Pointer.cs
- TextTreeRootTextBlock.cs
- FilterableAttribute.cs
- PropertyOverridesDialog.cs
- RC2CryptoServiceProvider.cs
- ResourceAttributes.cs
- SingleAnimation.cs
- HiddenField.cs
- diagnosticsswitches.cs
- RichTextBoxConstants.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- XamlToRtfParser.cs
- HtmlElementCollection.cs
- LoginCancelEventArgs.cs
- ImageButton.cs
- FixedSOMPage.cs
- OracleConnectionStringBuilder.cs