Karthikeya Boyini has Published 2383 Articles

What is a sealed class in C#?

karthikeya Boyini

karthikeya Boyini

Updated on 21-Jun-2020 12:48:54

569 Views

Sealed class in C# with the sealed keyword cannot be inherited. In the same way, the sealed keyword can be added to the method.When you use sealed modifiers in C# on a method, then the method loses its capabilities of overriding. The sealed method should be part of a derived ... Read More

Listing out directories and files using C#

karthikeya Boyini

karthikeya Boyini

Updated on 21-Jun-2020 12:41:57

335 Views

The Directory class in C# has many methods to perform operations on directories and sub-directories −Sr.NoMethod & Description1CreateDirectory(String)Creates all directories and subdirectories in the specified path unless they already exist.2CreateDirectoryDirectorySecurity(String)Creates all the directories in the specified path, unless the already exist, applying the specified Windows security.3Delete(String)Deletes an empty directory from ... Read More

Mathematical Functions in C#

karthikeya Boyini

karthikeya Boyini

Updated on 21-Jun-2020 12:41:40

1K+ Views

The System.Math class in C# provides methods are properties to perform mathematical operations, trigonometric, logarithmic calculations, etc.Some of its methods include −Sr.NoMethod & Description1Abs(Decimal)Returns the absolute value of a Decimal number.2Abs(Double)Returns the absolute value of a double-precision floating-point number.3Abs(Int16)Returns the absolute value of a 16-bit signed integer.4Abs(Int32)Returns the absolute value ... Read More

Math class methods in C#

karthikeya Boyini

karthikeya Boyini

Updated on 21-Jun-2020 12:33:38

339 Views

The System.Math class in C# provides methods are properties to perform mathematical operations, trigonometric, logarithmic calculations, etc.Some of its methods include −Sr.NoMethod & Description1Abs(Decimal)Returns the absolute value of a Decimal number.2Abs(Double)Returns the absolute value of a double-precision floating-point number.3Abs(Int16)Returns the absolute value of a 16-bit signed integer.4Abs(Int32)Returns the absolute value ... Read More

What are the rules for naming classes in C#?

karthikeya Boyini

karthikeya Boyini

Updated on 21-Jun-2020 12:28:25

369 Views

A class definition starts with the keyword class followed by the class name; and the class body enclosed by a pair of curly braces.The following is the syntax − class class_name {    // member variables     variable1;     variable2;    ...     variableN; ... Read More

What is the octal equivalent of a decimal number in C#?

karthikeya Boyini

karthikeya Boyini

Updated on 21-Jun-2020 12:14:46

121 Views

To get the octal equivalent of a decimal in C# −Firstly, for the decimal value use a while loop and store the remainder in the array set for octal. Here we found the mod 8 of them in the array.After that, divide the number by 8 −while (dec != 0) ... Read More

What are the escape sequences supported by C#?

karthikeya Boyini

karthikeya Boyini

Updated on 21-Jun-2020 12:06:35

105 Views

The following is an example showing how to display some of the escape characters in C# −Exampleusing System; using System.Collections.Generic; class Demo {    static void Main() {       Console.WriteLine("Warning!" + '\u0007');       Console.WriteLine("Test \t Demo Text");       Console.WriteLine("This is ... Read More

What are punctuators in C#?

karthikeya Boyini

karthikeya Boyini

Updated on 21-Jun-2020 11:58:22

350 Views

Punctuators are used in C# as special symbols to a group or divide the code. It includes −] () {}, ; * = #For example, = gets included in a class or even while declaring a variable. Statement ends with a semi-colon −int a = 10;In a class, the braces ... Read More

What is a base class in C#?

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 17:35:47

1K+ Views

When creating a class, instead of writing completely new data members and member functions, the programmer can designate that the new class should inherit the members of an existing class. This existing class is called the base class, and the new class is referred to as the derived class.A class ... Read More

What is the best IDE for C# besides Visual Studio?

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 17:33:18

1K+ Views

The alternative for Visual Studio IDE to run C# programs −SharpDevelopIt is an open source IDE to run C# programs but works only Microsoft Windows. SharpDevelop was developed as an alternative to Visual Studio. It is written in C#. Supports Git, SVN, NuGet, LINQPadIt is a utility that allows you ... Read More

Advertisements