No announcements
Found 941993 threads
-
8 Votes
c# default parameters to a method
How would you create a similar situation using overloads without optional parameters?Answered | 11 Replies | 8037 Views | Created by gilit2 - Monday, June 6, 2011 4:47 PM | Last reply by Louis.fr - Friday, June 10, 2011 4:23 PM -
2 Votes
Attribute on a particular parameter of a method?
However, you wouldn't really be able to anyways - there's no way to use a method and not use one parameter of the method - so it ...Answered | 7 Replies | 1578 Views | Created by Deepak Vasudevan - Wednesday, August 8, 2012 5:46 PM | Last reply by Deepak Vasudevan - Wednesday, August 8, 2012 7:47 PM -
0 Votes
out parameter without a method
That is not a out Parameter.Answered | 3 Replies | 771 Views | Created by amigo 1 - Wednesday, July 31, 2013 5:54 AM | Last reply by cheong00 - Wednesday, July 31, 2013 7:32 AM -
3 Votes
Method string parameters - Trim
Unfortunately, I don't know how workable that would be, since I have many methods taking string parameters, and I can't change their signatures.Answered | 12 Replies | 3372 Views | Created by Dr Griff - Wednesday, October 20, 2010 3:57 PM | Last reply by Dr Griff - Thursday, November 4, 2010 9:09 AM -
1 Votes
Methods and parameter comments
This will generate the summary, parameter and return tags based on the signature of your method.Answered | 8 Replies | 2830 Views | Created by NaeemKhan - Tuesday, February 9, 2010 11:36 AM | Last reply by NaeemKhan - Wednesday, February 10, 2010 12:20 PM -
4 Votes
My Method Parameter Dilema
I come to a point eventually in a class where I have to ask myself, "Does this method need parameters when I can just get what I need from the class's property or private ...Answered | 3 Replies | 2533 Views | Created by NoEgo - Tuesday, July 14, 2009 12:49 AM | Last reply by NoEgo - Wednesday, July 15, 2009 1:18 AM -
0 Votes
Method overload with object parameters
Given that you have void foo(string a); void foo(object a); and call foo with object parameter (that contains string), then the overload that takes object will be invoked - the second one ...Answered | 7 Replies | 6685 Views | Created by sn75 - Tuesday, October 13, 2009 1:57 PM | Last reply by sn75 - Tuesday, October 13, 2009 2:41 PM -
0 Votes
Pass a method as parameter, with diferent input parameters
and then as parameter, you need to pass That unknown type again to the delegate...., also you need to provide an object from that type Like ...Answered | 6 Replies | 1961 Views | Created by deadManN - Friday, December 30, 2011 10:39 AM | Last reply by deadManN - Friday, January 6, 2012 8:06 AM -
0 Votes
Method with two classes as parameters
https://social.msdn.microsoft.com/Forums/vstudio/en-US/2e02c3fe-90b3-43ef-999e-f41350b8b41a/method-with-two-classes-as-parameters?Answered | 4 Replies | 1014 Views | Created by bobis123 - Wednesday, October 3, 2018 10:52 AM | Last reply by Dave Patrick - Thursday, October 4, 2018 12:40 PM -
0 Votes
passing parameters to callback method
Typically, if you're using Task<T>, you wouldn't use callback methods.Answered | 1 Replies | 3308 Views | Created by shlomihassan - Tuesday, August 7, 2012 9:53 PM | Last reply by Reed Copsey, Jr - Wednesday, August 8, 2012 5:12 PM -
1 Votes
How to convert string condition to Func<T,bool> over WCF service?
It s now getting parameters as any entity type and generating expression condition based on the parameter class.Answered | 2 Replies | 4952 Views | Created by Ksdemirezen - Wednesday, March 24, 2010 2:46 PM | Last reply by Ksdemirezen - Friday, April 2, 2010 8:10 AM -
1 Votes
Using methods with both a params parameter and optional parameters
Optional parameters, like the one you used, always come *after* required ones, and the only exception to this is a parameter array, which by definition must be the last in the ...Answered | 4 Replies | 9410 Views | Created by Xanather - Thursday, July 5, 2012 11:48 AM | Last reply by Xanather - Friday, July 6, 2012 2:19 PM -
1 Votes
How to Unit Test this Method?
One day somebody is going to use the 3 parameter version, passing a value for k without realising that k is a function of a and b.Answered | 8 Replies | 3141 Views | Created by Dynamic - Thursday, September 10, 2009 9:24 AM | Last reply by Wole Ogunremi - Thursday, September 10, 2009 3:13 PM -
1 Votes
Need help understanding a method declaration
List<string> list = new List<string>(); list.Sample(/* func delegate here */); At compile time, it calls it as if it were a regular ...Answered | 3 Replies | 3238 Views | Created by JimsSVT - Thursday, October 29, 2009 1:35 PM | Last reply by David M Morton - Thursday, October 29, 2009 2:04 PM -
3 Votes
multithreding - method with parameter
and your test method in your code should match the delegate ParameterizedThreadStart, with one object type parameter.Answered | 5 Replies | 518 Views | Created by btsDeveloper - Monday, January 12, 2015 11:20 AM | Last reply by Vineet Bharadwaj - Tuesday, January 13, 2015 10:08 AM -
0 Votes
anonymous methods vs. lambda expressions
Cases where all the parameters can be omitted are quite rare and it's not worth the trouble do have anonymous methods in the language just for that.Answered | 1 Replies | 947 Views | Created by lasse - Tuesday, April 8, 2014 8:27 AM | Last reply by Mike Danes - Tuesday, April 8, 2014 8:57 AM -
3 Votes
function as a parameter
Additionally, note that C# 2 and C# 3 provide "anonymous methods" and "lambdas" (respectively).Answered | 5 Replies | 4070 Views | Created by stefanopod - Tuesday, July 1, 2008 11:00 AM | Last reply by Marc Gravell - Wednesday, July 2, 2008 11:33 AM -
0 Votes
Anonymous Method
Most event Handler (you never want to remove them - mostly) and some Function type parameters (like how to sort or how to filter data) make sense as A-Functions.Answered | 3 Replies | 1005 Views | Created by cunelson3 - Friday, February 22, 2013 4:10 PM | Last reply by Christopher84 - Saturday, February 23, 2013 8:06 PM -
3 Votes
How to call method with optional parameters?
The only way to skip an optional parameter is to use named parameters.Answered | 3 Replies | 2121 Views | Created by Rizwan Qamar - Thursday, August 18, 2011 9:49 AM | Last reply by GreatVolk - Thursday, August 18, 2011 10:33 AM -
0 Votes
Parameter limit on a method call in WCF
So you should check your parameters,All should be set with a value. or obejct.Answered | 3 Replies | 3996 Views | Created by rs_uk - Tuesday, August 4, 2009 3:57 PM | Last reply by Will.Rogers - Tuesday, August 4, 2009 5:27 PM
No announcements