optional-parameters
Why are C# 4 optional parameters defined on interface not enforced on implementing class?
I noticed that with the optional parameters in C# 4 if you specify anoptional parameter on an interface you don,t have to make that parameter optional on any implementing class:[详细]
2023-02-09 15:25 分类:问答Is passing NULL param exactly the same as passing no param
I\'m working with a function whose signature looks like this afunc(string $p1, mixed $p2, array $p3 [, int $p4 = SOM_CONST [, string $p5 ]] )[详细]
2023-02-02 13:56 分类:问答Parameterized query with several optional search terms
I have a web application with lots of data, and a search/filter function with several fields, such as name, status, date, and so on. I have been using parameterized queries like this for the regular ([详细]
2023-01-30 10:37 分类:问答SQL Stored Procedure with infinite optional parameters
I want to make a Stored Procedure that has a minimum of 2 required parameters, but that it can also be called with 2,3,4,5... and so on parameters.[详细]
2023-01-29 13:05 分类:问答Are Options and named default arguments like oil and water in a Scala API?
I\'m working on a Scala API (for Twilio, by the way) where operations have a pretty large amount of parameters and many of these have sensible default values. To reduce typing and increase usability,[详细]
2023-01-25 16:37 分类:问答Confused about method overloading
I\'m using .NET 4.0 with ASP.NET 4.0 and C# (would that be C# 4.0?). I want to insert some data into my SQL Server database and I have a method like so to handle this:[详细]
2023-01-24 04:03 分类:问答PHP Optional Parameters - specify parameter value by name?
I know it is possible to use optional arguments as follows: function doSomething($do, $something = \"something\") {[详细]
2023-01-22 07:11 分类:问答Optional method arguments in C++, but from the callee's side?
In C++ methods can have optional arguments, like this: void myFunction (int arg1, int arg2=0); In this case myFunction can be called with 1 integer or with two.If you omit the second integer, the v[详细]
2023-01-22 04:34 分类:问答Passing null to an optional parameter with default value
I think this is a pretty basic question, but I just want to clarify. If I have a variable with a null value, and pass it as a parameter that is optional, will the par开发者_JAVA百科ameter get the null[详细]
2023-01-17 08:17 分类:问答C# optional arguments in abstract method
Given: interface IFoo { void Print(string text = \"abc\"); } class Bar : IFoo { public void Print(string text = \"def\")[详细]
2023-01-17 04:38 分类:问答