Commits

Ryan Stecker committed 4152cb5

Added implicit casting operators to CSteamID and CGameID.

  • Participants
  • Parent commits 536311b

Comments (0)

Files changed (2)

Steam4NET2/Steam4NET2/CGameID.cs

         {
         }
 
+        public static implicit operator UInt64( CGameID gid )
+        {
+            return gid.gameid.Data;
+        }
+
+        public static implicit operator CGameID( UInt64 id )
+        {
+            return new CGameID( id );
+        }
+
         public UInt32 AppID
         {
             get

Steam4NET2/Steam4NET2/CSteamID.cs

             this.steamid = new InteropHelp.BitVector64( id );
         }
 
+        public static implicit operator UInt64( CSteamID sid )
+        {
+            return sid.steamid.Data;
+        }
+
+        public static implicit operator CSteamID( UInt64 id )
+        {
+            return new CSteamID( id );
+        }
+
         public void Set( UInt32 unAccountID, EUniverse eUniverse, EAccountType eAccountType )
         {
             this.AccountID = unAccountID;