basic syntax question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone help me understand the below? I get most of it, but don't
understand what GetProducts does? Is this supposed to be a function to
call? or is this the actual function that follows into the code below?

public static SqlDataReader GetProducts()
{
SqlConnection con = new SqlConnection(conString);
........
........
}

TIA
 
Hi,

Yes, it is a function.
However it is not an instance one, it is static one.
You don't have to create an instance of class that implements the function -
just use
SqlDataReader reader = YourClassName.GetProducts();

Don't forget to close reader when you are done...
 
Back
Top