Search results for query: *

  • Users: RHaggard
  • Content: Threads
  • Order by date
  1. R

    How to access allocated memory as either an array of shorts or an array of bytes

    A C# application needs to allocate memory and treat that block as either an array of bytes or an array of shorts. Here's what I've tried. A structure was declared that was supposed to have a byte[] and a short[] occupying the same memory space. [StructLayout(LayoutKind.Explicit)]...
  2. R

    How to detect if on foreground thread or not in Core from class assembly

    In Framework, this is easily accomplished by including a reference to the PresentationFramework class assembly and then using something like this: public static void UIThread( Action action ) { if (Application.Current.Dispatcher.CheckAccess()) { // On FG thread. Can directly...
Back
Top Bottom