I have started using the following in my automation code in instances where I'm not interested in keeping the object 'alive'and just using it as a means as a type of precondition. For example:
Instead of the following:
Login login = new Login() login.SetUserName(username).SetPassword(password).Submit()
I do the following instead (as an example!):
In the above example, what is this technique called, and is it wise to use it in the way that I'm doing?