Example #1
0
        /// <summary>
        /// Gets the termination status of the thread.
        /// </summary>
        public T GetExitCode <T>()
        {
            // Get the exit code of the thread (can be nullable)
            var ret = ThreadCore.GetExitCodeThread(Handle);

            // Return the exit code or the default value of T if there's no exit code
            return(ret.HasValue ? MarshalType <T> .PtrToObject(MemorySharp, ret.Value) : default(T));
        }