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
- PersistChildrenAttribute.cs
- WebResourceAttribute.cs
- ValuePattern.cs
- SettingsBindableAttribute.cs
- SqlUnionizer.cs
- RuleSet.cs
- SynchronousReceiveBehavior.cs
- WebUtil.cs
- ModuleElement.cs
- CheckBoxRenderer.cs
- GifBitmapDecoder.cs
- TreeNodeCollection.cs
- Byte.cs
- BitmapInitialize.cs
- SHA256Cng.cs
- XmlDataSourceNodeDescriptor.cs
- DataGridViewToolTip.cs
- ActivationArguments.cs
- PersonalizableTypeEntry.cs
- WorkflowWebHostingModule.cs
- ParserOptions.cs
- DesignerGenericWebPart.cs
- DataGridColumn.cs
- ClientData.cs
- AttachInfo.cs
- NonParentingControl.cs
- TextTreeTextElementNode.cs
- Helpers.cs
- EventLogger.cs
- GridProviderWrapper.cs
- ParallelEnumerableWrapper.cs
- SqlMethods.cs
- SelectionEditingBehavior.cs
- AesCryptoServiceProvider.cs
- JsonQNameDataContract.cs
- Classification.cs
- BitmapData.cs
- DisposableCollectionWrapper.cs
- DataStorage.cs
- ControlEvent.cs
- ValidationHelpers.cs
- QuadraticBezierSegment.cs
- AdornerHitTestResult.cs
- ViewGenResults.cs
- FormatSettings.cs
- NotifyInputEventArgs.cs
- storepermissionattribute.cs
- ParallelTimeline.cs
- _NetworkingPerfCounters.cs
- RoutedEvent.cs
- TerminatingOperationBehavior.cs
- TimeIntervalCollection.cs
- FormViewInsertEventArgs.cs
- C14NUtil.cs
- MetadataArtifactLoader.cs
- SqlParameterCollection.cs
- XPathScanner.cs
- FileLevelControlBuilderAttribute.cs
- NamedElement.cs
- fixedPageContentExtractor.cs
- StretchValidation.cs
- BinaryParser.cs
- QilList.cs
- NotificationContext.cs
- FileLogRecordStream.cs
- ColorPalette.cs
- XmlSchemaObjectTable.cs
- SimplePropertyEntry.cs
- HitTestWithPointDrawingContextWalker.cs
- ProcessHostConfigUtils.cs
- MimeTypeMapper.cs
- UnicodeEncoding.cs
- IncrementalReadDecoders.cs
- RecordBuilder.cs
- BroadcastEventHelper.cs
- CommandEventArgs.cs
- FormsAuthenticationEventArgs.cs
- EqualityComparer.cs
- EditingScope.cs
- IERequestCache.cs
- XmlSchemaValidator.cs
- DataBoundControlHelper.cs
- RegexCode.cs
- RemoteDebugger.cs
- ScriptModule.cs
- MergePropertyDescriptor.cs
- TreeViewBindingsEditor.cs
- HttpProtocolReflector.cs
- SafeEventLogWriteHandle.cs
- ThrowOnMultipleAssignment.cs
- ToolStripEditorManager.cs
- DefaultPrintController.cs
- ColorBuilder.cs
- SafeNativeMethods.cs
- ReadOnlyDataSourceView.cs
- ResourceDescriptionAttribute.cs
- AutoResetEvent.cs
- GridItem.cs
- LoginName.cs
- EntityStoreSchemaFilterEntry.cs