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
- AnimationClockResource.cs
- DataGridViewCheckBoxCell.cs
- SatelliteContractVersionAttribute.cs
- HostedTransportConfigurationManager.cs
- SignedInfo.cs
- CacheChildrenQuery.cs
- AddValidationError.cs
- SignatureDescription.cs
- InteropBitmapSource.cs
- MobileSysDescriptionAttribute.cs
- LookupNode.cs
- DragDropManager.cs
- HtmlInputImage.cs
- MediaSystem.cs
- _RegBlobWebProxyDataBuilder.cs
- CommandHelper.cs
- DataRelationPropertyDescriptor.cs
- CodeSnippetTypeMember.cs
- DependencyObject.cs
- Stroke2.cs
- OrderedHashRepartitionEnumerator.cs
- RoutingChannelExtension.cs
- FixedTextContainer.cs
- DataTemplateKey.cs
- LicenseContext.cs
- ImageKeyConverter.cs
- login.cs
- EventBuilder.cs
- StylusEditingBehavior.cs
- CodeArrayIndexerExpression.cs
- EastAsianLunisolarCalendar.cs
- IPEndPoint.cs
- RightsManagementProvider.cs
- Padding.cs
- DataContractSerializerSection.cs
- brushes.cs
- WizardStepBase.cs
- WorkflowItemPresenter.cs
- GridViewRowPresenterBase.cs
- DistinctQueryOperator.cs
- TTSEngineTypes.cs
- HyperLinkField.cs
- TypeLoadException.cs
- CriticalHandle.cs
- Rect3DValueSerializer.cs
- Operator.cs
- ConstraintConverter.cs
- OraclePermissionAttribute.cs
- EqualityArray.cs
- NavigationService.cs
- XmlCountingReader.cs
- NotifyCollectionChangedEventArgs.cs
- DataBindingHandlerAttribute.cs
- PathFigure.cs
- WebExceptionStatus.cs
- InvalidOperationException.cs
- EntitySetBase.cs
- XmlNavigatorStack.cs
- SqlDataSourceFilteringEventArgs.cs
- NavigateEvent.cs
- UrlMappingCollection.cs
- CLRBindingWorker.cs
- AssemblyFilter.cs
- HttpVersion.cs
- FamilyTypeface.cs
- BamlTreeUpdater.cs
- XmlEventCache.cs
- ISFClipboardData.cs
- Update.cs
- PanelStyle.cs
- FileSystemEventArgs.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- XmlSubtreeReader.cs
- CancellableEnumerable.cs
- Configuration.cs
- Grammar.cs
- DataBinder.cs
- ClientConfigurationHost.cs
- LongValidatorAttribute.cs
- EndPoint.cs
- Lookup.cs
- DefaultCommandExtensionCallback.cs
- FieldMetadata.cs
- WebEvents.cs
- _AutoWebProxyScriptWrapper.cs
- AppDomainProtocolHandler.cs
- ColumnResizeUndoUnit.cs
- NameValueSectionHandler.cs
- ChangeConflicts.cs
- TransformedBitmap.cs
- RegexBoyerMoore.cs
- X509RecipientCertificateServiceElement.cs
- GenericPrincipal.cs
- CodeObjectCreateExpression.cs
- CssTextWriter.cs
- ContainerAction.cs
- EntityUtil.cs
- ToolStripGrip.cs
- ListViewItem.cs
- QuaternionRotation3D.cs