m trying to make dll class but in m facing errors in it plzzz help me to resolve the...i really need help!!!
my full code is:-

namespace selectfinedetails
{
public class TransactionService
{

SqlConnection cs;


private void OpenConnection()
{

cs = new SqlConnection();
cs.ConnectionString = "Data Source=IRIS-CSG-174;Initial Catalog=library_system;Integrated Security=True";

cs.Open();
}
public void calculatefine()
{
OpenConnection();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "Exec member_fine_detail";
cmd.Parameters.Add(new SqlParameter("member_id", SqlDbType.Int));

SqlDataReader sdr = cmd.ExecuteReader();
cmd.ExecuteNonQuery();
{
public class member_details
{
private void details()
{
member_details obj = new member_details();
SqlCommand cmd = new SqlCommand();
obj.member_id =cmd.ExecuteReader();
obj.fine_per_day=cmd.ExecuteReader();
return obj=cmd.ExecuteScalar();

in member_details class member_id and fine_per day need to be define..how to define them...

You can not define a class inside a method.

public class Class1
{
   private void Method1()
   {
        //Body of Method1
   }

   private void Method2()
   {
        //Body of Method2
   }
}

public class Class2
{
  private void Method1()
   {
        //Body of Method1
   }

   private void Method2()
   {
        //Body of Method2
   }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.