Function from c++ to csharp
i want to convert this code from c++ to c#:

    array<String^,2>^ SelectARows(String^ myConnectionString, String^ inlist) 
    {
	PrintToErrorFile("Entering SelectARows...");

	array<String^,2>^ names = gcnew array<String^,2>(1200,4);
	try{
		OleDbConnection^ myConnection = gcnew OleDbConnection(myConnectionString);
		size_t found;
		found=myConnectionString->IndexOf("PIOLEDB");
		int pifound = 0;
		if (found!=string::npos){
		pifound = int(found);
		}
		String^ mySelectQuery;

		if(pifound > 0){
			mySelectQuery = "select tag, time, value, status FROM piarchive..pisnapshot WHERE tag in (" + inlist +")";
    }

`PrintToErrorFile` is another function i've created, i'm not familiar with this Visual c++ a lot, any help will be great :)

Function from c++ to csharp
===

i want to convert this code from c++ to c#:

    array<String^,2>^ SelectARows(String^ myConnectionString, String^ inlist) 
    {
	PrintToErrorFile("Entering SelectARows...");

	array<String^,2>^ names = gcnew array<String^,2>(1200,4);
	try{
		OleDbConnection^ myConnection = gcnew OleDbConnection(myConnectionString);
		size_t found;
		found=myConnectionString->IndexOf("PIOLEDB");
		int pifound = 0;
		if (found!=string::npos){
		pifound = int(found);
		}
		String^ mySelectQuery;

		if(pifound > 0){
			mySelectQuery = "select tag, time, value, status FROM piarchive..pisnapshot WHERE tag in (" + inlist +")";
    }

`PrintToErrorFile` is another function i've created, i'm not familiar with this Visual c++ a lot, any help will be great :)
