c# - (.net) Logging the function logic of my program -
I want to be able to log in for debugging purposes which functions are called and in what order. So I'm just putting debug WrightLine ("myfunctionName (args)") on all its operations, entering the file at the end. Is not there a better way to do this? I hope this will happen.
Look at aspect oriented programming
You can apply AOP in your C # code Can use for Such as
public class trace activity: OnMathBoundaryAsepact {public override zero onyari (method of action aggravating aggregates) {Trace Tees Information ("Entering {0}.", EventArg. } Public override zero onxit (methic action aving arge's eventArgS) {Trace Tees Information ("Lefting {0}.", EventArg. Method); }}
You can now decorate your methods with 'trace attribute' and you will be able to enter information about when the method is called.
Comments
Post a Comment