How does a property that returns a byte[,] signature have the same parameter types as a function that returns a bool and has a passed byte[,] signature?

Here is the command:
...My Documents>csc /target:library /out:CourtneyNumbrs.dll CourtneyNumbrs.cs

here is the output:
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.1
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.

CourtneyNumbrs.cs(25,17): error CS0082: Type 'CourtneyNumbers' already reserves a member called 'set_Numbers' with the
same parameter types
CourtneyNumbrs.cs(220,17): (Location of symbol related to previous error

Failed code on line 25:

public byte[,] Numbers {
  get {
    byte[,] sts = new byte[7,7];
    int i;
    int j;
    for (i = 0;i <7;i++) {
      for (j = 0;j <7;j++) {
        sts[i, j] = 0;
      }
    }
    for (i = 1;i <7;i += 2) {
      for (j = 1;j <7;j += 2) {
        sts[i, j] = Cnumbrs[i / 2, j / 2].Solve ;
      }
    }
  return sts;
  }
}

Reserved code on line 220:

public bool set_Numbers(byte[,] Numbrs) {
  byte o;
  bool ischanged = false;
  for (int j = 0;j < 3;j++) {
    for (int i = 0;i < 3;i++) {
      o = Numbrs[i, j];
      if (o > 14 && o < 50) this.Cnumbrs[i, j].Solve = o;
      else {
        ischanged = true;
        Numbrs[i, j] = Cnumbrs[i, j].Solve;
      }
    }
  }
  return ischanged;
}

In one case the property is Numbers, in the other, the function is set_Numbers, the parameter name is Numbrs. The array signature is the only thing that is common and you should be able to use the same parameter signatures when the names are different.
Yes, I solve the problem by adding a ref bool to the function that would now return a void.

Forcing different parameter types when you are producing overloaded routines with the same name makes perfect sense. Doing so for unrelated routines is nuts. (OK, semi-unrelated.)

Edited 6 Years Ago by kplcjl: tweek message

OK, I get it. "set_Numbers" and "Numbers" count as the same overloaded name using the byte[] signature and blew up.
So, C# is case sensitive but it ignores "_" as part of a routine's name. Anyone know why?
PS This code co-existed just fine:

public byte[,] Get_numbers {
        get {
		byte[,] vals = new byte[3,3];
		for (int i = 0;i < 3; i++) {
			for (int j = 0;j < 3; j++) {
				vals[i, j] = this.Cnumbrs[i, j].Solve;
			}
	        }
            return vals;
        }
    }

OK, they count as the same name in the checker, not in the calling routine:

byte[,] vals = new byte[3,3];
        Numbrs.Numbers(vals);// was set_Numbers

...\My Documents>csc /reference:CourtneyNumbrs.dll /target:winexe Courtney.cs

Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.1
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.

Courtney.cs(479,16): error CS1061: 'CourtneyNumbers' does not contain a definition for 'Numbers' and no extension method
'Numbers' accepting a first argument of type 'CourtneyNumbers' could be found (are you missing a using directive
or an assembly reference?)
Auugggg! It blows up like it's supposed to.
PS Numbrs is class 'CourtneyNumbers' . My first argument is really byte[,]!!!

Edited 6 Years Ago by kplcjl: n/a

This question has already been answered. Start a new discussion instead.