how to VB to C# convert

How to convert following code VB to C#

Public Function GetAppNos(ByVal prefixText As String, ByVal count As Integer) As String()
Dim cnn As OracleConnection = New OracleConnection(ReplaceWithurconnstring)
Dim adp As OracleDataAdapter
adp = New OracleDataAdapter("select * from Application where APP_NO like '" + prefixText + "%'", cnn)
Dim daset As Data.DataSet = New Data.DataSet
adp.Fill(daset, "aaa12")
Dim temp As New List(Of String)
For i As Integer = 0 To daset.Tables(0).Rows.Count - 1
Return temp.ToArray
End Function
Who is Participating?
Kalpesh ChhatralaConnect With a Mentor Software ConsultantCommented:
C# Code.

public string[] GetAppNos(string prefixText, int count)
	OracleConnection cnn = new OracleConnection(ReplaceWithurconnstring);
	OracleDataAdapter adp = default(OracleDataAdapter);
	adp = new OracleDataAdapter("select * from Application where APP_NO like '" + prefixText + "%'", cnn);
	System.Data.DataSet daset = new System.Data.DataSet();
	adp.Fill(daset, "aaa12");
	List<string> temp = new List<string>();
	for (int i = 0; i <= daset.Tables[0].Rows.Count - 1; i++) {
	return temp.ToArray();

Open in new window

you can also try below URL to convert your code.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.