List of Posts written during Nov 2022

This is a list of of posts written during the month Nov 2022
(Rev. 10-May-2024)

Categories | About |     |  

List of Posts

This is the complete list of categories of posts written during Nov 2022. They have been ordered by the publish date, with the most recent first.

  1. Published: 01-Nov-2022
    (LEVEL IS BEGINNERS) Suppose there is a model called StudentData with properties ID, Name, School and Marks. Also suppose we already have a collection of StudentData records with the first three properties already filled, and Marks is NULL. Write an Index page to display the data of the students in a table of 5 columns. The fifth column contains a link button called Edit. When the link is clicked, the user should be taken to a page called Edit. The Edit page contains a form where Name and Marks can only be edited. Update the collection when the form is submited and redirect the user to the index page to show the updated record.

  2. Published: 03-Nov-2022
    The concept of statements and expressions in C# is exactly the same as in other programming languages. So, this tutorial is a review for the sake of completeness. We have discussed Declaration Statements, Expression Statements, Empty Statement, Nested Statement Blocks, Selection Statements, Iteration Statements, Jumping Statements, Exception Statements, await Statements, fixed Statements and lock Statements.

  3. Published: 04-Nov-2022
    Array can be used to store many variables of the same type. An array can be of one dimension, can be of multiple dimensions and can even be a jagged array, which is commonly called an array of arrays. The size of an array is decided at the time of creation, and cannot be altered later.

  4. Published: 05-Nov-2022
    A collection class holds objects. We have seen that arrays also hold objects. The size of an array is fixed at the time of creation, but collections can grow and shrink as per need. Some collections can assign keys to the objects they hold. The elements can be accessed with a key like we have a dictionary.

  5. Published: 06-Nov-2022
    Reflection is used to obtain information about the functions, properties, events, fields of a given Type of dotnet. For example, we can use reflection to query the constructors and methods of the System.String class. We can even use Reflection to execute the methods queried through Reflection. We can use Reflection to obtain a description about the assembly that contains a given Type. Please do, however, take note that this is not something that is done very commonly - it's available when you need it.

  6. Published: 07-Nov-2022
    An application is often required to make database access, perform file read and write or contact internet for communication. All these tasks involve time consuming operations that make the main thread too busy. This causes the application to hang and freeze while the main thread waits for a large file to download. The solution to this problem lies in asynchronous task programming. A potentially long and time consuming operation can be run in parallel in such a way that the UI (user interface) remains responsive and, possibly, provides a progress feedback to the user. Let's explore it in this tutorial!

  7. Published: 07-Nov-2022
    A function throws an exception on failure. The functions that are expected to fail are written inside try blocks with one or more catch blocks. Each catch block handles a specific reason of failure. A catch block receives an exception object which is often used to obtain a detailed information of the cause of failure.

  8. Published: 11-Nov-2022
    A text file contains an unknown number of records. Each record is of the format ABCD,N where ABCD is the code of a supplier and N is a sequence of digits for the amount billed. For example CHD1,34678 is a record with a supplier code of CHD1 and billed amount of 34678. Your program has to read all the records and output a report in a file where all the records are arranged in the increasing order of the amount. The last line shows the sum total. If there is an error in any record the program should exit by printing "Error at record--- ".

  9. Published: 20-Nov-2022
    This project creates an HTTP Server on a Windows PC. The server presents an html page to a connecting client. The page contains html and javascript for communication with the server. The server is capable of serving json to ajax requests coming from the html page. A mobile phone can be used to connect to the application. The phone must be on the same wifi network. Let's see the basic pre-requisites and the broader function now.

  10. Published: 21-Nov-2022
    This is the first step of writing the code for the classroom voting application. In this tutorial we shall add a model class to hold voting data. We shall also add a project context for EF Core connectivity. Finally, we shall add migrations, and then apply the migrations. We shall then verify that the database get created. There are two pre-requisites that you must be aware because I shall assume that you are already familiar with C#. For this you can refer the list of my courses and locate the course on C#. Secondly you must also go through the chapter on Entity Framework Core for Console Applications.

  11. Published: 23-Nov-2022
    This is the second step of writing our project on classroom voting application. We shall now set an http listener to listen and respond to requests coming from a browser. For this, dotnet core provides a class called HttpListener. Most of the basic plumbing is handled by this class. We need only four things to get it working. First we have to add the listening routes to the Prefixes collection - wildcards are also supported. After that the listener is put into started mode, and a while loop is set to handle the requests. We have to provide an AsyncCallback delegate to handle a request, and write the response to the outputstream. This tutorial explains all the steps in sufficient detail. Let's see!

  12. Published: 26-Nov-2022
    Pay $10 and get all the following C# .NET Core Projects with Source Code. Code has been written with new C# features and syntax. Master the art of building projects with C#. The projects are interesting and close to real world examples. Read the page for details. All of them have been published on Udemy - see the link below.