for some strange reason I am not able to do very simple stuffs, like declaring a variable...for example when I write 'private bool result' it shows red error lines under both private and bool in visual studio stating that " ; expected " for bool and "Invalid expression term 'private' "
here is a sample code below:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OleDb;
using System.Data;
namespace DataAccessLayer
{
public abstract class BaseDAL
{
public DataTable getMultipleData(string query)
{
private bool result;
}
}
}
where am i going wrong here?!?!?! very confused...im using .NET 2.0 and Visual Studio 2005
Loading
Posted Mar 28, 2009, 11:15 PM
public class MyClass
{
private bool myBoolOne; // works fine
bool myBoolTwo; // will work as well, will default to "private" member access
public void MyFunction()
{
private bool myBoolThree; // will not work, cannot declare member access operator in local scope
bool myBoolFour; // works fine, is declare in scope of function
}
}