I was wondering if it was possible to create a temporary variable in C# that will be destroyed at the end of the function so I can use that variable name elsewhere in another function. Can anybody help me out?

Variables that are declared inside a method will always go out of scope at the end of that method. You don't need to do anything special to make it that way.

commented: Never knew this. Thank you. +0