Probeer een Array aan te maken, die willekeurig 100 getallen genereerd, rijen van 10 bij 10.
Hij geeft alleen de volgende error: [b]The type or namespace name 'Sort' does not exist in the namespace 'Array' (are you missing an assembly reference?) [b/]
Naar mijn weten moet dit gewoon kloppen en is Array.Sort gewoon een method die je kan uitvoeren.
Kan niet echt nuttige info vinden op google.nl en google.nl/codesearch
De volgende info komt msdn mee.
Error Message
The type or namespace name 'name' does not exist in the namespace 'namespace' (are you missing an assembly reference?)
A type was expected. Possible reasons include:
An assembly that contains the definition of a type was not referenced in the compilation; use /reference (Import Metadata) to specify the assembly.
You passed a variable name to the typeof operator.
See Add Reference Dialog Box for information on how to add a reference in the development environment.
The following sample generates CS0234:
Hij geeft alleen de volgende error: [b]The type or namespace name 'Sort' does not exist in the namespace 'Array' (are you missing an assembly reference?) [b/]
Naar mijn weten moet dit gewoon kloppen en is Array.Sort gewoon een method die je kan uitvoeren.
Kan niet echt nuttige info vinden op google.nl en google.nl/codesearch
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| namespace Array
{
class Program
{
static void Main(string[] args)
{
Random ar = new Random();
int [] mijnrij = new int [50];
for (int i = 0; i < mijnrij.Length; i++)
{
mijnrij[i] = ar.Next(100);
Console.Write("{0:d2} ", mijnrij[i]);
if (i % 10 == 9) Console.WriteLine();
}
Console.WriteLine();
Array.Sort(mijnrij);
for (int i = 0; i < mijnrij.Length; i++)
{
Console.Write(" {0:d2} ", mijnrij[i]);
if (i % 10 == 9) Console.WriteLine();
}
}
}
} |
De volgende info komt msdn mee.
Error Message
The type or namespace name 'name' does not exist in the namespace 'namespace' (are you missing an assembly reference?)
A type was expected. Possible reasons include:
An assembly that contains the definition of a type was not referenced in the compilation; use /reference (Import Metadata) to specify the assembly.
You passed a variable name to the typeof operator.
See Add Reference Dialog Box for information on how to add a reference in the development environment.
The following sample generates CS0234:
code:
1
2
3
4
5
6
7
8
9
10
11
| Copy Code
// CS0234.cs
public class C
{
public static void Main()
{
System.DateTime x = new System.DateTim(); // CS0234
// try the following line instead
// System.DateTime x = new System.DateTime();
}
} |