tagged [parameter-passing]
Passing Objects By Reference or Value in C#
Passing Objects By Reference or Value in C# In C#, I have always thought that non-primitive variables were passed by reference and primitive values passed by value. So when passing to a method any non...
- Modified
- 13 Oct at 05:55
Passing objects by reference vs value
Passing objects by reference vs value I just want to check my understanding of C#'s ways of handling things, before I delve too deeply into designing my classes. My current understanding is that: - `S...
- Modified
- 30 Jun at 02:45
C# Custom Attribute parameters
C# Custom Attribute parameters I saw this answer from this link [Adding parameters to custom attributes](https://stackoverflow.com/questions/270187/can-i-initialize-a-c-sharp-attribute-with-an-array-o...
- Modified
- 23 May at 12:10
If CancellationToken is a struct and is passed by Value, how is it updated?
If CancellationToken is a struct and is passed by Value, how is it updated? I see that CancellationToken is a struct [https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?vi...
- Modified
- 7 Jan at 07:34
Passing single value to params argument in NUnit TestCase
Passing single value to params argument in NUnit TestCase I have the following test: ``` [ExpectedException(typeof(ParametersParseException))] [TestCase("param1")] [TestCase("param1", "param2")] [Test...
- Modified
- 7 Mar at 07:51
How can I pass selected row to commandLink inside dataTable or ui:repeat?
How can I pass selected row to commandLink inside dataTable or ui:repeat? I'm using Primefaces in a JSF 2 application. I have a ``, and instead of selecting rows, I want the user to be able to directl...
- Modified
- 23 Sep at 14:10
Why is list when passed without ref to a function acting like passed with ref?
Why is list when passed without ref to a function acting like passed with ref? If I did not get this terribly wrong, this behaviour is strange for me. Rather than explaining, I'll post a sample code b...
- Modified
- 2 Jul at 22:6
Is there a way to omit out parameter?
Is there a way to omit out parameter? Let's assume I have a function with `out` parameter, however I do not need its value. Is there a way to pass no actual parameter if given result will be thrown aw...
- Modified
- 27 Jun at 10:35
Pass array to MySQL stored routine
Pass array to MySQL stored routine I need to pass an array of strings as parameter to a MySQL stored routine. The array could be long and its number of elements is not fixed. I then want to put the st...
- Modified
- 31 May at 18:54
Passing a SQL parameter to an IN() clause using typed datasets in .NET
Passing a SQL parameter to an IN() clause using typed datasets in .NET First apologies as there are similar questions on this site, but none of them answer this problem directly. Im using typed datase...
- Modified
- 23 Mar at 07:9
Reporting Services: Overriding a default parameter with an expression in a linked report
Reporting Services: Overriding a default parameter with an expression in a linked report So I've got a "daily dashboard" report in SSRS 2005. It has a parameter, @pDate, which defaults to "=Now". I'd ...
- Modified
- 11 Feb at 04:33
Pass property itself to function as parameter in C#
Pass property itself to function as parameter in C# I am looking for a method to pass property itself to a function. Not value of property. Function doesn't know in advance which property will be used...
- Modified
- 5 Dec at 23:46
Parameter Validation Best Practices
Parameter Validation Best Practices Imagine you have an application which is some kind of to all your business logic. This front-end has a lot of DLLs upon which it depends, and the methods in those D...
- Modified
- 28 Jun at 16:57
C# - passing parameters by reference to constructor then using them from method
C# - passing parameters by reference to constructor then using them from method In the following code, I am trying to have a method(Work) from class TestClass change the values of some variables in th...
- Modified
- 29 Oct at 11:31
Passing variables, creating instances, self, The mechanics and usage of classes: need explanation
Passing variables, creating instances, self, The mechanics and usage of classes: need explanation I just rewrote a working program into functions in a class and everything messed up. , in the `__init_...
- Modified
- 28 Jun at 23:42