Samual Sam has Published 2492 Articles

Built-in Exceptions in C#

Samual Sam

Samual Sam

Updated on 19-Jun-2020 08:10:13

324 Views

Exceptions are a problem that arises when a program executed. The following keyword handles exceptions in C#:tryA try block identifies a block of code for which particular exceptions is activated.CatchThe catch keyword indicates the catching of an exception.finallyExecute a given set of statements, whether an exception is thrown or not ... Read More

Three Different ways to calculate factorial in C#

Samual Sam

Samual Sam

Updated on 19-Jun-2020 08:08:47

543 Views

To calculate a factorial in C#, you can use any of the following three ways −Calculate factorial with for loopExampleLive Demousing System; using System.Collections.Generic; using System.Linq; using System.Text; namespace factorial {    class Test {       static void Main(string[] args) {          int i, ... Read More

Association, Composition and Aggregation in C#

Samual Sam

Samual Sam

Updated on 19-Jun-2020 08:06:31

5K+ Views

Association in C#The association defines the relationship between an object in C#. An a one-to-one, one-to-many, many-to-one and many-to-many relationship can be defined between objects.For example, An Employee can be associated with multiple projects, whereas a project can have more than one employee.Composition in C#Under Composition, if the parent object ... Read More

ArrayList in C#

Samual Sam

Samual Sam

Updated on 19-Jun-2020 07:49:26

499 Views

A resizable implementation of the List interface is called ArrayList. It is a non-generic type of collection in C# that dynamically resizes.Let us see how to initialize ArrayList in C# −ArrayList arr= new ArrayList();Add an element like the below-given code snippet −ArrayList arr1 = new ArrayList(); arr1.Add(120); arr1.Add(160);Let us see ... Read More

Removable Media in Computer Network

Samual Sam

Samual Sam

Updated on 19-Jun-2020 07:45:06

278 Views

The primary purpose of computer networks is to transfer data from a source machine to a destination machine. One of the elementary ways to transfer data between machines is to use removable storage media. The steps for the transfer are −Copy data from the source computer to the removable storage ... Read More

Coaxial Cable

Samual Sam

Samual Sam

Updated on 19-Jun-2020 07:40:40

5K+ Views

Coaxial cables, commonly called coax, are copper cables with metal shielding designed to provide immunity against noise and greater bandwidth. Coax can transmit signals over larger distances at a higher speed as compared to twisted pair cables.Structure of Coaxial CablesCoax has a central core of stiff copper conductor for transmitting ... Read More

A Deque Class in C#

Samual Sam

Samual Sam

Updated on 19-Jun-2020 07:35:29

1K+ Views

The Deque class uses a doubly-linked list to implement its collection of elements.  The doubly-linked lists should have two nodes i.e. front and back nodes. This helps in adding elements on the front and back of the Deque.With the Deque class, you have the ability to add and remove elements ... Read More

Asynchronous programming in C# using Async and Await keyword

Samual Sam

Samual Sam

Updated on 19-Jun-2020 07:33:17

2K+ Views

Asynchronous programming in C# is an efficient approach towards activities blocked or access is delayed. If an activity is blocked like this in a synchronous process, then the complete application waits and it takes more time. The application stops responding. Using the asynchronous approach, the applications continue with other tasks ... Read More

array-of- arrays double [][] in C#?

Samual Sam

Samual Sam

Updated on 19-Jun-2020 07:31:53

724 Views

Arrays of arrays in C# are known as Jagged Arrays. To declare jagged arrays, use the double [ ][ ].Let us now declare them −int [][] marks;Now, let us initialize it, wherein marks are arrays of 5 integers −int[][] marks = new int[][]{new int[]{ 90, 95 }, new int[]{ 89, ... Read More

Hierarchical Database Model

Samual Sam

Samual Sam

Updated on 19-Jun-2020 07:27:24

15K+ Views

A hierarchical model represents the data in a tree-like structure in which there is a single parent for each record. To maintain order there is a sort field which keeps sibling nodes into a recorded manner. These types of models are designed basically for the early mainframe database management systems, ... Read More

Advertisements