Is there any significant benefit to reading string directly from control instead of moving it into a

Posted by Kevin on Stack Overflow See other posts from Stack Overflow or by Kevin
Published on 2010-04-24T03:10:04Z Indexed on 2010/04/24 3:13 UTC
Read the original article Hit count: 213

Filed under:
sqlInsertFrame.Parameters.AddWithValue("@UserName", txtUserName.txt);

Given the code above...if I don't have any need to move the textbox data into a string variable, is it best to read the data directly from the control?

In terms of performance, it would seem smartest to not create any unnecessary variables which use up memory if its not needed. Or is this a situation where its technically true but doesn't yield any real world results due to the size of the data in question.

Forgive me, I know this is a very basic question.

© Stack Overflow or respective owner

Related posts about c#