Simply put, you can’t. Method-local variables only exist during the execution of the method. They can’t be accessed outside of the method at all.
More Related Contents:
- OutOfMemory exception when loading xml in C#
- C# WebBrowser Ajax call
- Interaction between forms — How to change a control of a form from another form?
- Deciding between HttpClient and WebClient
- Running multiple async tasks and waiting for them all to complete
- ObservableCollection that also monitors changes on the elements in collection
- Padding is invalid and cannot be removed?
- How to get the PropertyInfo of a specific property?
- Web API Put Request generates an Http 405 Method Not Allowed error
- How to write some data to excel file(.xlsx)
- Converting SVG to PNG using C# [closed]
- Is there a Lower Bound function on a SortedList?
- How to convert List to List?
- Why no ICloneable?
- Entity Framework (.NET Full Framework) Ordering Includes [duplicate]
- catch all unhandled exceptions in ASP.NET Web Api
- How to compare only date components from DateTime in EF?
- Why writing items to console writes only namespace and class name instead of data? [duplicate]
- Entity Framework 6 Code First Custom Functions
- Why do C# collection initializers work this way?
- How do I find duplicates in an array and display how many times they occurred?
- How to insert characters to a file using C#
- What thread runs the code after the `await` keyword?
- Extract thumbnail for any file in Windows
- How to set selected value from Combobox?
- Screen Resolution Problem In WPF?
- What is type-safe in .net?
- How to serialize and deserialize a PFX certificate in Azure Key Vault?
- Taking input from a joystick with C# .NET
- Catch Application Exceptions in a Windows Forms Application