out Questions
5
Solved
I am new to C#. I've tried this with out parameter in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class First
{
public void fun(out int m)
{
m *= 1...
1
Solved
I'm trying to use Moq to mock a callback for the following method signature:
ResponseHeader AddIncentives(
Hs_transRow[] data,
out ResponseBody responseBody);
I want my callback to use the dat...
Krilov asked 16/3, 2016 at 13:28
5
Solved
Error : Security header is not valid
Array
(
[TIMESTAMP] => 2014%2d04%2d29T07%3a24%3a29Z
[CORRELATIONID] => 6af6749c848d6
[ACK] => Failure
[VERSION] => 109%2e0
[BUILD] => 10800...
2
Is there a way with MOQ to have sequential calls on a method return different out parameters?
For a quick example getting the method:
public void OutputANumber(out int number)
to output 1, foll...
Asci asked 10/2, 2016 at 17:32
1
Hi I am trying to store the output of a command run through a spawn ssh remote window into my local host, I am new to expect and am not able to figure out where I am wrong.
My Code:
#!/bin/bash
w...
10
Solved
I don't understand when an output parameter should be used, I personally wrap the result in a new type if I need to return more than one type, I find that a lot easier to work with than out.
I hav...
4
Solved
When reading a comment to an answer I saw the following construct to declare and initialize a variable:
int variable = int.TryParse(stringValue, out variable) ? variable : 0;
Is this allowed, co...
Disapproval asked 10/9, 2015 at 8:40
4
Solved
I've noticed that C# compiler (.NET 4.5.2) doesn't allow me to compile the following code:
public void Test(out string value)
{
//value = null;
try
{
value = null;
}
catch (Exception ex)
{...
Hyper asked 4/9, 2015 at 18:46
2
Solved
In an extension method, I am receiving an error that my 'out' parameter does not exist in the current context. I assume this means that extension methods cannot have 'out' parameters, but this is n...
Tolley asked 23/8, 2015 at 6:20
1
Solved
I am trying to write a unit test for a method that has out parameters. My method specifically is a TryParse method for my custom object. I am using .NET 4.5/5 with Visual Studio 2013. This allows m...
Sulfapyrazine asked 10/3, 2015 at 17:27
4
Solved
I'm unclear as to why the following code snippet isn't covarient?
public interface IResourceColl<out T> : IEnumerable<T> where T : IResource {
int Count { get; }
T this[int index]...
Plumbum asked 18/1, 2012 at 16:36
2
Solved
VB.NET doesn't have out parameters, but you can specify <Out()> ByRef on COM and P/Invoke methods to get the same effect for external methods.
Does specifying the same on internal methods (i...
3
Solved
Why is the code below
private static List<WorkflowVariableDataSet> MergeDatasetsListBranch(out List<WorkflowVariableDataSet> datasetsList)
{
if(datasetsList == null)
datasetsList=new...
Exsanguinate asked 5/2, 2014 at 12:38
1
All i want to use Out keyword with my Async function. According to MSDN it is not possible Async modifiers not supports to the out keyword. So is there any alternate in .Net framework 4.5/4.0 ?
Soonsooner asked 5/2, 2014 at 7:23
5
Solved
I guess it's related to println()'s newline functionality ('\n'), but in abbreviated letter-based form, that would be nl rather than ln. Thank you for any comments.
3
Solved
Is there a way to change flash players audio output device? if not, is there a swf player who has this possibility? Thanks!
2
Solved
I read the page Passing Arrays Using ref and out (C# Programming Guide) and was wondering why we would need to define an array parameter as a ref parameter when it is already a reference type. Won'...
2
What is the effect of SYSO - System.out.println()? If my computer is executing a large job such as fetching 2 Lakhs (approximately 2,000,000) records from a database to a file, does SYSO affect the...
3
Solved
I want to do a hbase scan with filters. For example, my table has column family A,B,C, and A has a column X. Some rows have the column X and some do not. How can I implement the filter to filter ou...
2
I'm currently trying to make a site where the user can log in with his google+ account. Most of it is working. I get them to grant access to my website. They can log in and I get their name and use...
Gatekeeper asked 13/5, 2013 at 20:19
1
Solved
I have a method passing a string to a class. For testing reasons I have used a button for now.
I have searched in the forum for similar questions but they refer to php and other situation that I am...
4
Solved
In C#, I am using a StreamReader to read a file, line per line. I am also keeping the current line's number in an int, for reports of possible error messages.
Reading each line goes along with som...
Furriery asked 2/5, 2013 at 7:56
3
Solved
When doing something like:
int value;
if (dict.TryGetValue(key, out value))
{
if (condition)
{
//value = 0; this copies by value so it doesn't change the existing value
dict[key] = 0;
}
}
else...
Recollect asked 9/4, 2013 at 13:49
3
Solved
I'm trying to convert this C# method into PHP. What does the out in the second parameter mean?
public static bool Foo(string name, out string key)
5
Solved
So I am new to C# and I am having difficulty understanding out. As opposed to just returning something from a function
using System;
class ReturnTest
{
static double CalculateArea()
{
double r=...
© 2022 - 2024 — McMap. All rights reserved.