+ 2
What is PrintBarr(...) in C#?
Can someone please explain what does PrintBarr function do in C# and what is the difference between consolewritline and printbarr?
3 ответов
+ 7
C# doesn't seem to have a built-in method called "PrintBarr". Whatever you've read is most likely a user-defined function.
Searching online returned something like this, a method written to print a BitArray.
static void PrintBarr(string name, BitArray ba)
{
Console.Write(name + " : ");
for (int x = 0; x < ba.Length; x++)
Console.Write(ba.Get(x) + " ");
Console.WriteLine();
}
https://code.sololearn.com/c6u3V5As2frG/?ref=app
0
thank you for answering. That makes alot more sense.
0
I only seen it used to represent BitArrays in the Console.
BitArray ba3 = new BitArray(5);
ba3.SetAll(true);
PrintBarr("ba3", ba3);
//Console Result.
ba3 : True True True True True