B
BERNARDO MEDINA
Hi somebody cant tellme what is wrong here
If i do this !!! This is the code
Sample 1:
using System;
using System.Collections.Generic;
using System.Text;
namespace test001
{
public class Program
{
public static void Main()
{
int var01;
var01 = 90;
mr(out var01);
}
static void mr(out int varpass)
{
Console.WriteLine(varpass);
}
}
}
This code give me a error : Use of unassigned out parameter 'varpass'
The out parameter 'varpass' must be
assigned to before control leaves the current method
But this is correct
Sample 1:
using System;
using System.Collections.Generic;
using System.Text;
namespace test001
{
public class Program
{
public static void Main()
{
int var01;
var01 = 90;
mr(out var01);
}
static void mr(out int varpass)
{
varpass = 10;
Console.WriteLine(varpass);
}
}
This is a bug? or it supose to happen
Thank !!
If i do this !!! This is the code
Sample 1:
using System;
using System.Collections.Generic;
using System.Text;
namespace test001
{
public class Program
{
public static void Main()
{
int var01;
var01 = 90;
mr(out var01);
}
static void mr(out int varpass)
{
Console.WriteLine(varpass);
}
}
}
This code give me a error : Use of unassigned out parameter 'varpass'
The out parameter 'varpass' must be
assigned to before control leaves the current method
But this is correct
Sample 1:
using System;
using System.Collections.Generic;
using System.Text;
namespace test001
{
public class Program
{
public static void Main()
{
int var01;
var01 = 90;
mr(out var01);
}
static void mr(out int varpass)
{
varpass = 10;
Console.WriteLine(varpass);
}
}
This is a bug? or it supose to happen
Thank !!