It seems relatively straightforward to me. When a user registers you create a key generator with the password, the length of the salt you want and the number of iterations to perform, then save the generated salt and key to the database:
vb.net Code:
  1. Private Sub registerButton_Click(sender As System.Object, e As System.EventArgs) Handles registerButton.Click
  2.     Dim salt As Byte()
  3.     Dim key As Byte()
  4.  
  5.     Register(passwordTextBox.Text, salt, key)
  6.  
  7.     'Save salt and key to database.
  8. End Sub
  9.  
  10. Private Sub Register(password As String, ByRef salt As Byte(), ByRef key As Byte())
  11.     'Create a key generator for the password with a 16-byte salt value that uses 10 iterations.
  12.     Using generator As New Rfc2898DeriveBytes(password, 16, 10)
  13.         'Get the generated salt.
  14.         salt = generator.Salt
  15.  
  16.         'Get a 32-byte key.
  17.         key = generator.GetBytes(32)
  18.     End Using
  19. End Sub
When the user logs on you get the salt and the key from that database, generate a key from the provided password and salt and see if it matches the stored value:
vb.net Code:
  1. Private Sub logonButton_Click(sender As System.Object, e As System.EventArgs) Handles logonButton.Click
  2.     'Get salt and key from database.
  3.     Dim salt As Byte()
  4.     Dim key As Byte()
  5.  
  6.     If Logon(passwordTextBox.Text, salt, key) Then
  7.         'The logon was successful.
  8.     End If
  9. End Sub
  10.  
  11. Private Function Logon(password As String, salt As Byte(), expectedKey As Byte()) As Boolean
  12.     'Create a key generator for the password with the specified salt value that uses 10 iterations.
  13.     Using generator As New Rfc2898DeriveBytes(password, salt, 10)
  14.         'Get a 32-byte key.
  15.         Dim actualKey = generator.GetBytes(32)
  16.  
  17.         'Compare the actualKey to the expectedKey.
  18.         For i = 0 To actualKey.GetUpperBound(0)
  19.             If actualKey(i) <> expectedKey(i) Then
  20.                 'No match
  21.                 Return False
  22.             End If
  23.         Next
  24.  
  25.         'Match found
  26.         Return True
  27.     End Using
  28. End Function