BCA Semester 5 – DotNet Technology – Unit 4: Advanced C# (14Hrs)
Comprehensive questions and detailed answers for Unit 4: Advanced C# (14Hrs). Perfect for exam preparation and concept clarity.
a) What is LINQ? Write a program to select employees whose salary is greater than 20000 and whose address is kathmandu using LINQ b) Write a C# program to show insert and select operation in database.
What is generics? List different types of generic classes. Explain delegate with example.
What do you mean by lambda expression? Explain different types of lambda expression used in C# with example.
a) Write a program to create user registration form in one ASP.NET web page and display filled data in another page.
b) Write a program for handling exception in ASP.NET
a) How virtual method is used to achieve dynamic binding in C#? Explain with the help of suitable program.
b) Define operator overloading. Write a C# program to overload binary operator.
a) What is LINQ? Write a program to select employees whose salary is greater than 20000 and whose address is kathmandu using LINQ
b) Write a C# program to show insert and select operation in database.
What is an Exception? Write a program to generate divide by zero exception and index out of Range exception and also handle these exception.
What is a Query expression? Write a C# program to select Students who are lived in Kirtipur and studied in Patan Multiple Campus using LINQ.
Explain difference between ExecuteReader and ExecuteNonQuery. Provided that a mysql database named "Company" with table named "Product" with following columns (ProductId as int, ProductName as varchar(20), and UnitPrice as float). Write a C# program to connect to the database and display product records that have UnitPrice is greater than RS. 1000 and update the product record (such as Unit Price 4500) from ProductId whose ProductId=50.
What is web server control in ASP.NET? List five web server control used in ASP.NET. Write a program to create student registration form in one ASP.NET page and display the filled data within another page.
a) What is System Exception? Write a C# program that will read balance and withdraw amount from keyboard and display the remaining balance on screen. if balance is greater than withdrawal amount otherwise throw an Application Exception with appropriate message. b) List any five LINQ standard operators? Write a C# program to compute aggregate salary of 5 employee and then display employee record in descending order with respective employee salary using LINQ.
What are different type of delegate in C#? Write a C# Program to create a class 'Time' which represents time. The class should have three fields for hours, minutes and seconds. It should have constructor to initialize hours, minutes and seconds and method Time() to print current time.overload following operators a) +(Add two time objects of 24 hours clock) b) Compare two time objects
What is difference between executeScalar() and executeReader() method? Write a C# program to connect database Bank and insert 5 customer record (Account_no, Name, Address, Balance) in Customer table and Display the customer record whose balance is greater than 5000.
What is virtual method? Write a program to illustrate multi-level inheritance with virtual method.
What are keyword used in exception handling? Write a C# program to handle IndexOutOfRangeException and InvalidCastException.
What is query syntax in LINQ? Explain the standard query operators "select", "contains", "orderBy" and "where" in LINQ with suitable examples.
a) What is an event? Explain with suitable program, how event is handled in C#. b) What is Lambda expression? Explain the concept of generic delegates with suitable program.
What are component of ASP.NET? Explain various validation server control in ASP.NET with suitable program.
Sample Questions
What is generics? List different types of generic classes. Explain delegate with example.
What do you mean by lambda expression? Explain different types of lambda expression used in C with example.
a) Write a program to create user registration form in one ASP.NET web page and display filled data in another page. b) Write a program for handling exception in ASP.NET
a) How virtual method is used to achieve dynamic binding in C? Explain with the help of suitable program.\ b) Define operator overloading. Write a C program to overload binary operator.
And more questions available on this page.