Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / WebSysDefaultValueAttribute.cs / 1 / WebSysDefaultValueAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web { using System; using System.ComponentModel; [AttributeUsage(AttributeTargets.All)] internal sealed class WebSysDefaultValueAttribute : DefaultValueAttribute { private Type _type; private bool _localized; internal WebSysDefaultValueAttribute(Type type, string value) : base(value) { _type = type; } internal WebSysDefaultValueAttribute(string value) : base(value) { } public override object TypeId { get { return typeof(DefaultValueAttribute); } } public override object Value { get { if (!_localized) { _localized = true; string baseValue = (string)base.Value; if (!String.IsNullOrEmpty(baseValue)) { object value = SR.GetString(baseValue); if (_type != null) { try { value = TypeDescriptor.GetConverter(_type).ConvertFromInvariantString((string) value); } catch (NotSupportedException) { value = null; } } base.SetValue(value); } } return base.Value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EventBindingService.cs
- SqlEnums.cs
- LassoSelectionBehavior.cs
- IPHostEntry.cs
- TextBoxAutomationPeer.cs
- ReaderWriterLock.cs
- DataGridViewRowStateChangedEventArgs.cs
- StandardBindingElementCollection.cs
- ReachDocumentReferenceSerializer.cs
- EntityTransaction.cs
- ProcessModuleCollection.cs
- BinaryNode.cs
- TaskSchedulerException.cs
- SynchronizationHandlesCodeDomSerializer.cs
- DesignerActionVerbList.cs
- EntityException.cs
- HttpRequestCacheValidator.cs
- DesignTimeType.cs
- SimpleApplicationHost.cs
- Calendar.cs
- MulticastOption.cs
- DispatcherEventArgs.cs
- ExpressionConverter.cs
- GeneratedContractType.cs
- SID.cs
- VectorConverter.cs
- DataControlField.cs
- ProtocolViolationException.cs
- SqlStream.cs
- EventListener.cs
- ShaderEffect.cs
- SelectionPatternIdentifiers.cs
- UIElementParaClient.cs
- ReceiveActivityDesigner.cs
- Context.cs
- ColumnResizeAdorner.cs
- SqlHelper.cs
- COM2TypeInfoProcessor.cs
- PerformanceCounter.cs
- AliasedSlot.cs
- StructuralComparisons.cs
- ParallelForEach.cs
- ImportCatalogPart.cs
- SecurityKeyIdentifierClause.cs
- COM2ComponentEditor.cs
- PointCollection.cs
- ModelTreeManager.cs
- UncommonField.cs
- DataGridView.cs
- Attribute.cs
- XhtmlBasicListAdapter.cs
- XmlSchemaAppInfo.cs
- ContainerFilterService.cs
- ValidationEventArgs.cs
- Point4D.cs
- RemotingService.cs
- EntryWrittenEventArgs.cs
- SchemaHelper.cs
- ZipPackagePart.cs
- QueryException.cs
- RegexTree.cs
- RequestSecurityTokenResponse.cs
- remotingproxy.cs
- SHA1Managed.cs
- RoleManagerSection.cs
- LinkedDataMemberFieldEditor.cs
- DataGridViewComboBoxCell.cs
- CompilationSection.cs
- Region.cs
- InstanceKeyView.cs
- FixedFindEngine.cs
- Material.cs
- activationcontext.cs
- ListBoxChrome.cs
- Latin1Encoding.cs
- ForeignKeyConstraint.cs
- DoubleCollectionValueSerializer.cs
- DoubleLinkList.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- RbTree.cs
- StatusBar.cs
- TouchEventArgs.cs
- GridViewAutomationPeer.cs
- HeaderFilter.cs
- PageParser.cs
- EncoderBestFitFallback.cs
- QilTypeChecker.cs
- UnsafeNativeMethods.cs
- MsmqIntegrationInputMessage.cs
- SqlBulkCopyColumnMapping.cs
- UInt16Converter.cs
- ObjectQueryExecutionPlan.cs
- OdbcConnection.cs
- CqlWriter.cs
- EventSinkHelperWriter.cs
- IntellisenseTextBox.designer.cs
- SerialReceived.cs
- ProxySimple.cs
- GenericTypeParameterBuilder.cs
- Expressions.cs