G
Guest
I have a class like
public class keyword
{
blah......blah
}
and i have other class will use the keyword class
public class general
{
//i have to declare array of keyword class
keyword [] oKey;
int index = 0;
public void AddKey(string key)
{
oKey[index] = new keyword();
oKey[index].sKey = key;
index++;
}
}
the problem i have the oKey is null ,because i did not create an object from
keyword class, what is want is not declare a fixed size of keyword class like
keyword [] key = new keyword[10];
i need to dynamillcay create the keyword arrary.
any help?
public class keyword
{
blah......blah
}
and i have other class will use the keyword class
public class general
{
//i have to declare array of keyword class
keyword [] oKey;
int index = 0;
public void AddKey(string key)
{
oKey[index] = new keyword();
oKey[index].sKey = key;
index++;
}
}
the problem i have the oKey is null ,because i did not create an object from
keyword class, what is want is not declare a fixed size of keyword class like
keyword [] key = new keyword[10];
i need to dynamillcay create the keyword arrary.
any help?