# using keyword:- using keyword has two major uses:-
Note:- Internally using keyword call the dispose method to dispose the I Disposable interface.
public List<Student> GetSudent()
{
using (DbFirstProjectEntities _context=new DbFirstProjectEntities())
{
var students = _context.Students.ToList();
return students;
}
}
2.As a directive: Using keyword can be used to include a namespace in our program.
using System.Text;
No comments:
Post a Comment