In C# you can not set default values for method parameters like in Delphi. So you can not make a method like this:
private int DoSomething(int Start, int End = -1);
The only way to 'simulate' this is using an overloaded method.
What is overloading?
Overloading gives you the possibility to name two methods the same, but they must have different parameters. So in a way you can simulate the default parameters.
In Delphi you must mark this methods as overloaded in C# you can write your methods without any keyword.
When using overloading for 'default' purposes it should be considered that if you don't do this clever you will be put up with two methods with almost te same code, so it is wise to follow the rule that the method with the fewest parameters calls the other one.
So in the DoSomething method:
(A very stupid function indeed :) )
private int DoSomething(int Start, int End);
if (End !=- 1)
return Start + End;
return Start + 1000;
private int DoSomething(int Start);
return DoSomething(Start, -1);
//So do not do this, you will end up with two same code paths:
// return Start + 1000;
Using an image as your UIBarButtonItem in your navigationcontroller bar can only be achieved by using a common UIButton as the BarButtonItem...
Delphi 2009 has support for generics, and has 'built in' generic types like TList, TArrays etc. If you want to use them you must add...
A new generic type in Delphi 2009 is TDictionary . TDictionary offers a way to store values based on a key into a list. TDictionary is decla...
In ASP.NET it is easy to set the prefered authentication method in the web.config file. For external websites this is set mostly to Forms ...