Question : How do i convert a System.data.Linq.Binary type to a System.Data.SqlTypes.SqlBinary type?

I have a user input an ID and password in a silverlight application.  I convert the user-entered password string to a System.Data.SqlTypes.Sqlbinary type.

I then, using a linq query, try to validate the user by checking the user-entered password (now SqlBinary) against the password in the sql server database table; however, I'm using linq so visual studio 2010 automatically tries to convert the sqlbinary type to a linq.binary type.  

That throws an error at compile time.  How do i get around that?

This is the error I get:
Overload resolution failed because no accessible '=' can be called with these arguments:
    'Public Shared Operator =(x As System.Data.SqlTypes.SqlBinary, y As System.Data.SqlTypes.SqlBinary) As System.Data.SqlTypes.SqlBoolean': Value of type 'System.Data.Linq.Binary' cannot be converted to 'System.Data.SqlTypes.SqlBinary'.
    'Public Shared Operator =(binary1 As System.Data.Linq.Binary, binary2 As System.Data.Linq.Binary) As Boolean': Value of type 'System.Data.SqlTypes.SqlBinary' cannot be converted to 'System.Data.Linq.Binary'.      

Answer : How do i convert a System.data.Linq.Binary type to a System.Data.SqlTypes.SqlBinary type?

Sorry error in last post, try this.
1:
2:
3:
Dim user = (From u In db.UserInfo  _
            Where userPW.CompareTo(u.Password) = 0 _
            Select u).FirstOrDefault()
Random Solutions  
 
programming4us programming4us