C#, Visual Basic • Generate Code With the ValidateUser Method

Listing 1. The Class Designer generates code based on the information entered into the designer. Here you can see the ValidateUser method that you entered on the design surface. Notice that no GUIDs or other identifiers are present in the code, making for a clean code-generation tool.

C#
/// <summary>
/// Validates that the user is in the system.
/// </summary>
/// <param name="userName">The user's name</param>
/// <param name="password">The user's password</param>
/// <param name="passType">Indicates if the user's password is in clear 
/// text or encoded 
/// text.</param>
/// <returns>0 if the user is not found, otherwise the ID of the 
/// user</returns>
public int ValidateUser(string userName, string password, PasswordType 
	passType)
	{
		throw new System.NotImplementedException();
	} 

VB
''' <summary>
''' Validates that the user is in the system.
''' </summary>
''' <param name="userName">The user's name.</param>
''' <param name="password">The user's password</param>
''' <param name="passType">Indicates if the user's password is in clear 
''' text or encoded text.</param>
''' <returns>0 if the user is not found, otherwise the ID of the 
''' user</returns>
Public Function ValidateUser(ByVal userName As String, ByVal _
	password As String, ByVal passType As PasswordType) As Integer

End Function