c# Programming Glossary: mymethod2
How to document thrown exceptions in c#/.net http://stackoverflow.com/questions/461306/how-to-document-thrown-exceptions-in-c-net exceptions. In the following example public void MyMethod1 MyMethod2 also may throw InvalidOperationException public void MyMethod2.. also may throw InvalidOperationException public void MyMethod2 System.IO.File.Open somepath... this may throw FileNotFoundException.. called by MyMethod1 Should I document exceptions thrown by MyMethod2 Should I document exceptions thrown by File.Open What would..
Determine the name of the variable used as a parameter to a method http://stackoverflow.com/questions/742350/determine-the-name-of-the-variable-used-as-a-parameter-to-a-method string myVar Hello World MyTestMethod2 myVar public void MyMethod2 string parm do some reflection magic here that detects that.. Remember that there might not be an actual variable used MyMethod2 myVar 123 In this case myVar holds just parts of the value the..
C# optional parameters on overridden methods http://stackoverflow.com/questions/8909811/c-sharp-optional-parameters-on-overridden-methods string s aaa Console.WriteLine s public virtual void MyMethod2 MyMethod class BBB AAA public override void MyMethod string.. string s bbb base.MyMethod s public override void MyMethod2 MyMethod static void Main string args BBB asd new BBB asd.MyMethod.. void Main string args BBB asd new BBB asd.MyMethod asd.MyMethod2 c# .net override optional parameters share improve this..
|