For the following code in my home work shows an error The type or namespace name ‘boolean’ could not be found
class LinkedList
{
private Node first;
public LinkedList()
{
first = null;
}
public boolean isEmpty()
{
return (first == null);
}
public void insert(int val)//inserts at beginning of list
{
Node newNode = new Node(val);
newNode.next = first;
first = newNode;
}
public Node delete()//deletes at beginning of list
{
Node temp = first;
first = first.next;
return temp;
}
Every where on the internet i found almost similar question but are not exactly for boolean,
Someone please help me out. By the way i am learning c# for 3-4 says.
It’s
bool(lowercase b) orBooleanin C#. Consider usingboolthough since it’s much shorter and more consistent with other languages (except Java…).Source: http://msdn.microsoft.com/en-us/library/c8f5xwh7%28VS.71%29.aspx