I am using C#.NET 2008 and i was wondering about how to create a procedure to store information to trace erros in an application, I made this code:
|
So, I want to call this procedure from any place of my application.
I need to let this procedure and the l_Report variable visible for all code in any part of my application.
Is it possible? how?
thanks in advance,
Amit ChoudharyPosted Mar 23, 2010, 1:16 AM
Create a class Util.cs
make your method static so that it can be accessed using directly by class name.
Put it under the same namespace of your application.
and you are done.
Access the method using classname where you want.
Please mark as answer if it helps .
EduardoPosted Mar 24, 2010, 9:47 AM
You saved my life :)
You also helped me about other things about .NET
thank you, so much!