Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / InterOp / OperatingSystemVersionCheck.cs / 1305600 / OperatingSystemVersionCheck.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; namespace System.Windows.Interop { ////// Performs a simple check of the current operating system version. /// Use this class to determine whether version specific features should /// be enabled. /// internal static class OperatingSystemVersionCheck { internal static bool IsVersionOrLater(OperatingSystemVersion version) { // int major; int minor; PlatformID platform = PlatformID.Win32NT; switch (version) { case OperatingSystemVersion.Windows7: major = 6; minor = 1; break; case OperatingSystemVersion.WindowsVista: major = 6; minor = 0; break; case OperatingSystemVersion.WindowsXPSP2: default: major = 5; minor = 1; break; } OperatingSystem os = Environment.OSVersion; return (os.Platform == platform) && (((os.Version.Major == major) && (os.Version.Minor >= minor)) || (os.Version.Major > major)); } } } // 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
- ConditionalAttribute.cs
- MediaContextNotificationWindow.cs
- DataServiceRequestException.cs
- XsltArgumentList.cs
- PartialToken.cs
- NullToBooleanConverter.cs
- SafeMILHandleMemoryPressure.cs
- FixedSOMSemanticBox.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- MDIWindowDialog.cs
- CrossSiteScriptingValidation.cs
- RTLAwareMessageBox.cs
- ArgumentsParser.cs
- ProcessThreadCollection.cs
- ExpressionList.cs
- WebUtil.cs
- HyperLinkDesigner.cs
- MediaSystem.cs
- ContentOperations.cs
- XmlUtilWriter.cs
- ResourcesGenerator.cs
- OleDbDataReader.cs
- CompositeKey.cs
- XmlSchemaComplexContentRestriction.cs
- ReturnValue.cs
- Constants.cs
- WorkflowDefinitionDispenser.cs
- TextSchema.cs
- AutomationPropertyInfo.cs
- WebPartTransformerCollection.cs
- ViewStateModeByIdAttribute.cs
- TemporaryBitmapFile.cs
- CompilationUtil.cs
- ValidationPropertyAttribute.cs
- LoginDesigner.cs
- SecurityState.cs
- ColumnResult.cs
- ConfigurationSchemaErrors.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- UpDownEvent.cs
- SectionXmlInfo.cs
- SelectingProviderEventArgs.cs
- ScalarConstant.cs
- DataListCommandEventArgs.cs
- ScrollEvent.cs
- ContainerControl.cs
- _SslSessionsCache.cs
- UnmanagedHandle.cs
- RenderTargetBitmap.cs
- CombinedGeometry.cs
- CodeMethodMap.cs
- CancellationHandler.cs
- WindowsTitleBar.cs
- XslAstAnalyzer.cs
- WorkflowDefinitionContext.cs
- StringPropertyBuilder.cs
- SBCSCodePageEncoding.cs
- ImageUrlEditor.cs
- InvalidFilterCriteriaException.cs
- SQLResource.cs
- ApplyTemplatesAction.cs
- Mappings.cs
- TransformedBitmap.cs
- FragmentNavigationEventArgs.cs
- DesignerActionUIStateChangeEventArgs.cs
- GeneratedView.cs
- VectorValueSerializer.cs
- TextEffect.cs
- VisualStateChangedEventArgs.cs
- dsa.cs
- ArrangedElementCollection.cs
- ValueSerializerAttribute.cs
- IISUnsafeMethods.cs
- CFStream.cs
- TextFragmentEngine.cs
- WebPartMinimizeVerb.cs
- RawStylusInputCustomData.cs
- DomainConstraint.cs
- TrackingWorkflowEventArgs.cs
- ConfigurationSectionCollection.cs
- ColumnCollection.cs
- TypeDelegator.cs
- SslStreamSecurityUpgradeProvider.cs
- FactoryGenerator.cs
- loginstatus.cs
- DelegatingTypeDescriptionProvider.cs
- BitmapPalette.cs
- RemoteCryptoDecryptRequest.cs
- mediaeventshelper.cs
- TypeHelper.cs
- HelpEvent.cs
- XmlUnspecifiedAttribute.cs
- SharedHttpsTransportManager.cs
- DeadLetterQueue.cs
- HandlerMappingMemo.cs
- BuildProvider.cs
- ExtensionQuery.cs
- ConfigurationSection.cs
- X509SubjectKeyIdentifierClause.cs
- BackEase.cs