I have a reference to C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\2.0.0.0_x86\Microsoft.DirectX.dll in my project.
The problem:
I've seen numerous tutorials doing this:
int adapterOrdinal =
Manager.Adapters.Default.Adapter;
Static member 'Microsoft.DirectX.Direct3D.AdapterCollection.Default.get' cannot be accessed with an instance reference; qualify it with a type name instead
First, when I type in Manager.Adapters. Intellisense does not show a Default property.
When I go to the definition of AdapterCollection (returned by the Adapters property), I do see the static Default property:
public struct AdapterCollection : IEnumerable<AdapterDetails> {
public const int DefaultOrdinal = 0;
public static bool operator!=(AdapterCollection l, AdapterCollection r);
public static bool operator==(AdapterCollection l, AdapterCollection r);
public int Count {
get;
}
public static AdapterDetails Default {
get;
}
...
Furthermore, AdapterDetails.Adapter does exist and should return an int:
public struct AdapterDetails {
public static bool operator!=(AdapterDetails l, AdapterDetails r);
public static bool operator==(AdapterDetails l, AdapterDetails r);
public int Adapter {
get;
}
...
First off, shouldn't that public int Adapter property actually be coded as public static int Adapter
What am I doing wrong Any hints would be greatly appreciated!

Beginning Managed DirectX (C#): Manager.Adapters.Default
popsdawg
luvly_girl
A quick question to show my newness: If I use the 1.1 version, but am coding in .NET 2.0, will I have 2 instances of the .NET runtime in memory, both the 2.0 (for my code) and the 1.1 (for the MDX)
Toper
kalle vanska