UserThread.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Web / System / Web / Services / Interop / UserThread.cs / 1305376 / UserThread.cs

                            namespace System.Web.Services.Interop { 
    using System;
    using System.Threading;
    using System.Runtime.InteropServices;
 
    [StructLayout(LayoutKind.Sequential)]
    internal class UserThread { 
        internal int pSidBuffer; // byte * to buffer of size dwSidLen. 
        internal int dwSidLen;
        internal int dwTid; 

        internal UserThread() {
            pSidBuffer = 0;
            dwSidLen = 0; 
            dwTid = 0;
        } 
 
        public override bool Equals(object obj) {
            if (! (obj is UserThread)) { 
                return false;
            }

            UserThread ut = (UserThread) obj; 

            if (ut.dwTid == this.dwTid && 
                ut.pSidBuffer == this.pSidBuffer && 
                ut.dwSidLen == this.dwSidLen) {
                return true; 
            }

            return false;
        } 

        public override int GetHashCode() { 
            return base.GetHashCode(); 
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK