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
- TraceRecords.cs
- AdjustableArrowCap.cs
- DataShape.cs
- DbProviderFactoriesConfigurationHandler.cs
- SBCSCodePageEncoding.cs
- TargetException.cs
- cache.cs
- SemanticResolver.cs
- FloaterBaseParagraph.cs
- SyndicationCategory.cs
- DataKeyPropertyAttribute.cs
- BamlVersionHeader.cs
- GridViewUpdatedEventArgs.cs
- Animatable.cs
- CustomSignedXml.cs
- NonVisualControlAttribute.cs
- CookielessHelper.cs
- PagePropertiesChangingEventArgs.cs
- ColorMatrix.cs
- StackBuilderSink.cs
- PixelFormats.cs
- BrowserCapabilitiesCompiler.cs
- GridViewEditEventArgs.cs
- IArgumentProvider.cs
- ActivityExecutionContext.cs
- MemberBinding.cs
- BitmapEffectDrawing.cs
- WebRequestModuleElementCollection.cs
- XmlSchemaParticle.cs
- RuleInfoComparer.cs
- XslUrlEditor.cs
- XmlChoiceIdentifierAttribute.cs
- XmlSchemaComplexContentRestriction.cs
- DragDrop.cs
- BaseProcessProtocolHandler.cs
- ObjectListComponentEditor.cs
- AppendHelper.cs
- EntityDataSourceWrapperCollection.cs
- XmlSchemaFacet.cs
- HitTestParameters3D.cs
- InputQueue.cs
- DefaultMemberAttribute.cs
- ProfilePropertySettingsCollection.cs
- RbTree.cs
- SoapAttributeAttribute.cs
- LowerCaseStringConverter.cs
- WmlCommandAdapter.cs
- MimeMultiPart.cs
- LayoutTableCell.cs
- WorkflowInstanceExtensionManager.cs
- CodeIdentifiers.cs
- DBBindings.cs
- CharAnimationBase.cs
- cookie.cs
- XsltException.cs
- ColumnMapProcessor.cs
- InvalidDataException.cs
- EndOfStreamException.cs
- GenericTypeParameterConverter.cs
- TreeView.cs
- DependentList.cs
- ComboBoxRenderer.cs
- newinstructionaction.cs
- ClassGenerator.cs
- OdbcHandle.cs
- ToolStripHighContrastRenderer.cs
- ApplicationTrust.cs
- SrgsToken.cs
- PtsPage.cs
- SafeFileHandle.cs
- oledbmetadatacolumnnames.cs
- IdentityHolder.cs
- ActivityPropertyReference.cs
- OdbcCommand.cs
- RenameRuleObjectDialog.Designer.cs
- HandleRef.cs
- TableAdapterManagerHelper.cs
- CodeDomDesignerLoader.cs
- RootDesignerSerializerAttribute.cs
- HashAlgorithm.cs
- UserControlParser.cs
- StylusCaptureWithinProperty.cs
- StyleModeStack.cs
- StaticExtensionConverter.cs
- PieceNameHelper.cs
- BaseTemplateParser.cs
- SystemDiagnosticsSection.cs
- UnmanagedHandle.cs
- ComboBox.cs
- ImageSourceConverter.cs
- RequestNavigateEventArgs.cs
- NavigationProgressEventArgs.cs
- ContractHandle.cs
- SamlDoNotCacheCondition.cs
- LoadedOrUnloadedOperation.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- TextEditorSpelling.cs
- BufferBuilder.cs
- Debug.cs
- TrustManagerPromptUI.cs