Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Util / AssemblyUtil.cs / 1305376 / AssemblyUtil.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System;
using System.Reflection;
namespace System.Web.Util {
internal static class AssemblyUtil {
private const string _emptyFileVersion = "0.0.0.0";
public static string GetAssemblyFileVersion(Assembly assembly) {
AssemblyFileVersionAttribute[] attributes =
(AssemblyFileVersionAttribute[])assembly.GetCustomAttributes(typeof(AssemblyFileVersionAttribute), false);
string version;
if (attributes.Length > 0) {
version = attributes[0].Version;
if (String.IsNullOrEmpty(version)) {
version = _emptyFileVersion;
}
}
else {
version = _emptyFileVersion;
}
return version;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System;
using System.Reflection;
namespace System.Web.Util {
internal static class AssemblyUtil {
private const string _emptyFileVersion = "0.0.0.0";
public static string GetAssemblyFileVersion(Assembly assembly) {
AssemblyFileVersionAttribute[] attributes =
(AssemblyFileVersionAttribute[])assembly.GetCustomAttributes(typeof(AssemblyFileVersionAttribute), false);
string version;
if (attributes.Length > 0) {
version = attributes[0].Version;
if (String.IsNullOrEmpty(version)) {
version = _emptyFileVersion;
}
}
else {
version = _emptyFileVersion;
}
return version;
}
}
}
// 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
- NameSpaceExtractor.cs
- XmlDocumentType.cs
- ECDiffieHellmanCng.cs
- IntSecurity.cs
- LinqDataSourceDeleteEventArgs.cs
- UnionCodeGroup.cs
- ZoneLinkButton.cs
- ZipFileInfo.cs
- MessageQueueEnumerator.cs
- ConnectionStringsExpressionBuilder.cs
- PrintingPermissionAttribute.cs
- PageBuildProvider.cs
- NavigationEventArgs.cs
- TextSpanModifier.cs
- Vector3DConverter.cs
- ProjectionPlan.cs
- TypefaceCollection.cs
- CreateUserWizard.cs
- TimelineGroup.cs
- HashCodeCombiner.cs
- BezierSegment.cs
- InvalidProgramException.cs
- Line.cs
- ping.cs
- SmiContext.cs
- VariantWrapper.cs
- XmlLinkedNode.cs
- ToolStripPanelSelectionGlyph.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- WhereaboutsReader.cs
- RelationshipEndMember.cs
- DesignerSelectionListAdapter.cs
- OleTxTransactionInfo.cs
- OwnerDrawPropertyBag.cs
- CustomActivityDesigner.cs
- DropDownList.cs
- AnimatedTypeHelpers.cs
- ProfilePropertyNameValidator.cs
- UserControlParser.cs
- TextElementAutomationPeer.cs
- AlternateView.cs
- HatchBrush.cs
- SoapAttributeOverrides.cs
- StyleBamlRecordReader.cs
- XsltLoader.cs
- StylusOverProperty.cs
- AutomationTextAttribute.cs
- PropertyDescriptorComparer.cs
- DocumentPageViewAutomationPeer.cs
- ColumnWidthChangedEvent.cs
- SetStateEventArgs.cs
- HttpRequest.cs
- XmlSerializerNamespaces.cs
- HealthMonitoringSection.cs
- SqlException.cs
- BufferedGraphicsManager.cs
- JapaneseCalendar.cs
- StringArrayEditor.cs
- InternalControlCollection.cs
- TextBoxAutomationPeer.cs
- StringUtil.cs
- Comparer.cs
- MarginCollapsingState.cs
- OdbcDataReader.cs
- RtfToken.cs
- SqlTypesSchemaImporter.cs
- RowUpdatingEventArgs.cs
- LongCountAggregationOperator.cs
- Comparer.cs
- TagMapInfo.cs
- OleAutBinder.cs
- XmlSchemaGroupRef.cs
- IPAddress.cs
- ModifierKeysValueSerializer.cs
- DesignerVerb.cs
- LineSegment.cs
- EdmProperty.cs
- PersonalizationProviderHelper.cs
- Menu.cs
- InfoCardSymmetricCrypto.cs
- TemporaryBitmapFile.cs
- DataSet.cs
- PerformanceCounterLib.cs
- CryptoConfig.cs
- ImageIndexConverter.cs
- UrlMapping.cs
- DispatchChannelSink.cs
- TextFormattingConverter.cs
- MsmqHostedTransportManager.cs
- NodeFunctions.cs
- AttributeEmitter.cs
- XamlToRtfParser.cs
- ImageField.cs
- XappLauncher.cs
- LineInfo.cs
- ContextMenuService.cs
- FindProgressChangedEventArgs.cs
- CollectionViewProxy.cs
- ThrowHelper.cs
- ToolStripMenuItem.cs