I am trying to write a class, but I got stuck.
When writing a class, how can you call a recursive function that is also in
the class
file, but without having to create a new instance of the class before you
call it.
// This is my class file
using System.Data;
using System.Windows.Forms;
namespace Misc_Utils
{
class InitializeMyDB
{
public void PrepareConnections(........)
{
// prepare the variables here
foreach (......)
{
StoreDB(....);
}
}
}
class StoreIntoToDB
{
public void StoreDB(....)
{
// do my processing here
foreach (......)
{
StoreDB(....);
}
}
}
}
Am I stuck with just having to create a new instance of the
StoreInfoToDB.StoreDB()
everytime I need to make a call to that function?
Or is there a way to encapsulate the two functions and make it one class?
TIA