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
- BufferedReceiveManager.cs
- ExtractedStateEntry.cs
- RootBuilder.cs
- ProfileSettings.cs
- autovalidator.cs
- DataSourceCacheDurationConverter.cs
- ZipIORawDataFileBlock.cs
- OleDbErrorCollection.cs
- WindowsFont.cs
- _IPv6Address.cs
- ProcessModule.cs
- RotateTransform3D.cs
- ChtmlTextWriter.cs
- EventListener.cs
- VBCodeProvider.cs
- SqlDependency.cs
- UriSection.cs
- DataGridTextBox.cs
- XmlFormatExtensionPointAttribute.cs
- XmlnsCompatibleWithAttribute.cs
- CodeExporter.cs
- StylusPointPropertyInfoDefaults.cs
- DataBindingList.cs
- ProfileGroupSettingsCollection.cs
- IndentedTextWriter.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- ApplyImportsAction.cs
- XamlGridLengthSerializer.cs
- DataStorage.cs
- SafeLocalAllocation.cs
- GuidConverter.cs
- EntityDescriptor.cs
- PenContexts.cs
- ExceptionRoutedEventArgs.cs
- HeaderLabel.cs
- ExpressionEvaluator.cs
- DecoderBestFitFallback.cs
- RectangleF.cs
- FrameworkElement.cs
- PropertyChangingEventArgs.cs
- BaseTemplateCodeDomTreeGenerator.cs
- CodeTypeDeclaration.cs
- graph.cs
- RefExpr.cs
- TreeNodeBindingCollection.cs
- ContextBase.cs
- SHA256Cng.cs
- _NegoState.cs
- HttpModuleActionCollection.cs
- HtmlWindowCollection.cs
- ObjectStorage.cs
- OrderedDictionary.cs
- SchemaImporterExtensionElement.cs
- Camera.cs
- CompilerCollection.cs
- IISUnsafeMethods.cs
- EncodingDataItem.cs
- ZipFileInfo.cs
- ListChangedEventArgs.cs
- ProgressBarRenderer.cs
- MetaDataInfo.cs
- SafeViewOfFileHandle.cs
- Label.cs
- ReliabilityContractAttribute.cs
- SecurityBindingElement.cs
- HtmlHead.cs
- XamlToRtfParser.cs
- MatrixValueSerializer.cs
- ReturnType.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- DispatcherExceptionEventArgs.cs
- LinkArea.cs
- future.cs
- CheckedListBox.cs
- Quaternion.cs
- AnnotationResourceChangedEventArgs.cs
- Calendar.cs
- XmlExtensionFunction.cs
- WmpBitmapDecoder.cs
- DBDataPermission.cs
- Bold.cs
- TracedNativeMethods.cs
- RegistryPermission.cs
- JournalNavigationScope.cs
- UntypedNullExpression.cs
- DataPagerFieldCollection.cs
- CustomDictionarySources.cs
- SafePEFileHandle.cs
- FontFamilyValueSerializer.cs
- DocumentSequence.cs
- UpdatePanelControlTrigger.cs
- FloaterParaClient.cs
- GridViewUpdateEventArgs.cs
- ConsumerConnectionPointCollection.cs
- EventProviderWriter.cs
- WsdlServiceChannelBuilder.cs
- CodeTypeReferenceCollection.cs
- DataPagerCommandEventArgs.cs
- TextChange.cs
- HttpWebRequest.cs