public Q getQuestion(int QuestionID,int ChapterID)where Q:IQuestion,new(){ if (QuestionID == 0) { using (SQLite.SQLiteConnection conn = new SQLite.SQLiteConnection(docPath)) { var questionS =(from b in conn.Table () where b.question_level==0 && b.chapter_id==ChapterID select b ).Take (1); List ListQuestionS=new List(questionS); return ListQuestionS[0]; } } else { using (SQLite.SQLiteConnection conn = new SQLite.SQLiteConnection(docPath)) { var questionS =new List(from b in conn.Table () where b.question_id==QuestionID && b.chapter_id==ChapterID select b ); return questionS[0]; } } }