Karthikeya Boyini has Published 2383 Articles

Accessing Attributes and Methods in C#

karthikeya Boyini

karthikeya Boyini

Updated on 19-Jun-2020 08:12:55

248 Views

An attribute is a declarative tag that is used to convey information to runtime about the behaviors of various elements like classes, methods, structures, enumerators, assemblies etc. in your program. To set an attribute −[attribute(positional_parameters, name_parameter = value, ...)] ElementHere, the name of the attribute and values come inside [ ] ... Read More

Addition and Concatenation in C#

karthikeya Boyini

karthikeya Boyini

Updated on 19-Jun-2020 08:11:15

247 Views

To add and concatenate strings in C#, use the string. Concat method. The plus operator can also be used for the same purpose of concatenation.Plus Operatorstring str2 = "Hanks" + str1;ExampleLet us see an example of + operator to concatenate strings −Live Demousing System; class Program {    static ... Read More

Abstract vs Sealed Classes vs Class Members in C#

karthikeya Boyini

karthikeya Boyini

Updated on 19-Jun-2020 08:09:12

1K+ Views

The abstract class includes abstract and non-abstract methods. You cannot instantiate an abstract class.The sealed class prevents inheritance and you cannot use it as a base class.Abstract ClassesTo declare an abstract class, you need to place the keyword abstract before the class definition. An example of class members in an abstract ... Read More

Array Copy in C#

karthikeya Boyini

karthikeya Boyini

Updated on 19-Jun-2020 08:07:16

5K+ Views

Use the array. copy method in C# to copy a section of one array to another.Our original array has 10 elements −int [] n = new int[10]; /* n is an array of 10 integers */Our new array that would copy a section of array 1 has 5 elements −int ... Read More

Beginning C# programming with Hello World

karthikeya Boyini

karthikeya Boyini

Updated on 19-Jun-2020 07:51:01

361 Views

The following is a simple “Hello World” program in C# programming −ExampleLive Demousing System; namespace MyHelloWorldApplication {    class MyDemoClass {       static void Main(string[] args) {          // display text          Console.WriteLine("Hello World");          // display another text ... Read More

Transmission Media

karthikeya Boyini

karthikeya Boyini

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

14K+ Views

The transmission medium can be defined as a pathway that can transmit information from a sender to a receiver. Transmission media are located below the physical layer and are controlled by the physical layer. Transmission media are also called communication channels.Transmission media are of two types −Guided Transmission MediumUnguided Transmission ... Read More

‘this’ keyword in C#

karthikeya Boyini

karthikeya Boyini

Updated on 19-Jun-2020 07:38:18

9K+ Views

The “this” keyword in C# is used to refer to the current instance of the class. It is also used to differentiate between the method parameters and class fields if they both have the same name.Another usage of “this” keyword is to call another constructor from a constructor in the ... Read More

Abstract Classes in C#

karthikeya Boyini

karthikeya Boyini

Updated on 19-Jun-2020 07:34:12

2K+ Views

An abstract class in C# includes abstract and non-abstract methods. A class is declared abstract to be an abstract class. You cannot instantiate an abstract class.Let us see an example, wherein we have an abstract class Vehicle and abstract method display()−public abstract class Vehicle {    public abstract void display(); ... Read More

Access Modifiers in C#

karthikeya Boyini

karthikeya Boyini

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

432 Views

Access Modifiers specifies the scope of variable and functions in C#. The following are the access modifiers used provided by C#:PublicThe public modifier sets no restriction on the access of members.ProtectedAccess limited to the derived class or class definition.InternalThe Internal access modifier access within the program that has its declaration.Protected ... Read More

One-to-Many Relationship Model

karthikeya Boyini

karthikeya Boyini

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

3K+ Views

In a "class roster" database, a teacher may teach zero or more classes, while a class is taught by one (and only one) teacher. In a "company" database, a manager manages zero or more employees, while an employee is managed by one (and only one) manager. In a "product sales" ... Read More

Advertisements