Example of exporting a data symbol in C#
C#
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Properties
.gitattributes
.gitignore
App.config
OptimusEnablementNET.csproj
OptimusEnablementNET.sln
Program.cs
README.md

README.md

OptimusEnablementNET

This is an example of adding a data export to a C# program to select the correct GPU on an NVIDIA Optimus System.

It works around the fact that you can't directly export a symbol in C# by editing the IL after compilation and the fact you can only export code in .NET by editing the export's value at module load.