
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2587 Articles for Csharp

164 Views
The Char.IsSeparator() method in C# indicates whether the specified Unicode character is categorized as a separator character.SyntaxFollowing is the syntax −public static bool IsSeparator (char ch);Above. ch is the Unicode character to evaluate.ExampleLet us now see an example to implement the Char.IsSeparator() method −using System; public class Demo { public static void Main(){ bool res; char val = ', '; Console.WriteLine("Value = "+val); res = Char.IsSeparator(val); Console.WriteLine("Is the value a separator? = "+res); } }OutputThis will produce the following output −Value = , ... Read More

548 Views
The Char.IsPunctuation() method in C# indicates whether the specified Unicode character is categorized as a punctuation mark.SyntaxFollowing is the syntax −public static bool IsPunctuation (char ch);Above, ch is the Unicode character to evaluate.ExampleLet us now see an example to implement the Char.IsPunctuation() method −using System; public class Demo { public static void Main(){ bool res; char val = 'q'; Console.WriteLine("Value = "+val); res = Char.IsPunctuation(val); Console.WriteLine("Is the value a punctuation? = "+res); } }OutputThis will produce the following output −Value = q Is ... Read More

140 Views
The MathF.Acos() method in C# is used to return the angle whose cosine is given as a float value argument.SyntaxFollowing is the syntax −public static float Acos (float val);Above, Val is the floating-point number.ExampleLet us now see an example to implement the MathF.Acos() method −using System; public class Demo { public static void Main(){ float val1 = 0.1f; float val2 = 0.9f; Console.WriteLine("Angle (val1) = "+(MathF.Acos(val1))); Console.WriteLine("Angle (val2) = "+(MathF.Acos(val2))); } }OutputThis will produce the following output −Angle (val1) = 1.470629 Angle (val2) = 0.4510269ExampleLet us ... Read More

178 Views
The MathF.Abs() method in C# is used to return the absolute value of a float number.SyntaxFollowing is the syntax −public static float Abs (float val);Above, the parameter Val is the specified float number.ExampleLet us now see an example to implement the MathF.Abs() method −using System; public class Demo { public static void Main(){ float val1 = 20.5f; float val2 = -89.5f; Console.WriteLine("Absolute float value1 = "+(MathF.Abs(val1))); Console.WriteLine("Absolute float value2 = "+(MathF.Abs(val2))); } }OutputThis will produce the following output −Absolute float value1 = 20.5 Absolute float value2 ... Read More

148 Views
The UInt64.MinValue field in C# represents the minimum value of the 64-bit unsigned integer.SyntaxFollowing is the syntax −public const ulong MinValue = 0;ExampleLet us now see an example to implement the UInt64.MinValue field −using System; public class Demo { public static void Main(){ ulong val1 = 879879879; ulong val2 = 464556565; Console.WriteLine("Value1 = "+val1); Console.WriteLine("Value2 = "+val2); Console.WriteLine("HashCode for value1 = "+val1.GetHashCode()); Console.WriteLine("HashCode for value2 = "+val2.GetHashCode()); Console.WriteLine("Are they equal? = "+(val1.Equals(val2))); TypeCode type1 = ... Read More

343 Views
The UInt64.MaxValue field in C# represents the maximum value of the 64-bit unsigned integer.SyntaxFollowing is the syntax −public const ulong MaxValue = 18446744073709551615;ExampleLet us now see an example to implement the UInt64.MaxValue field −using System; public class Demo { public static void Main(){ ulong val1 = 879879879; ulong val2 = 464556565; Console.WriteLine("Value1 = "+val1); Console.WriteLine("Value2 = "+val2); Console.WriteLine("HashCode for value1 = "+val1.GetHashCode()); Console.WriteLine("HashCode for value2 = "+val2.GetHashCode()); Console.WriteLine("Are they equal? = "+(val1.Equals(val2))); TypeCode type1 = ... Read More

124 Views
The Int64.GetTypeCode() method in C# is used to return the TypeCode for value type Int64.SyntaxFollowing is the syntax −public TypeCode GetTypeCode ();ExampleLet us now see an example to implement the Int64.GetTypeCode() method −using System; public class Demo { public static void Main(){ long val1 = 0; long val2 = Int64.MaxValue; Console.WriteLine("Value1 = "+val1); Console.WriteLine("Value2 = "+val2); Console.WriteLine("Are they equal? = "+val1.Equals(val2)); Console.WriteLine("Value1 (HashCode) = "+val1.GetHashCode()); Console.WriteLine("Value2 (HashCode) = "+val2.GetHashCode()); TypeCode type1 = val1.GetTypeCode(); ... Read More

586 Views
The Decimal.Subtract() method in C# is used to subtract two specified Decimal values.SyntaxFollowing is the syntax −public static decimal Subtract (decimal val1, decimal val2);Above, va1 is the minuend, whereas val2 is the subtrahend.ExampleLet us now see an example to implement the Decimal.Subtract() method −using System; public class Demo { public static void Main(){ Decimal val1 = 3.45m; Decimal val2 = 2.35m; Console.WriteLine("Decimal 1 = "+val1); Console.WriteLine("Decimal 2 = "+val2); Decimal res = Decimal.Subtract(val1, val2); Console.WriteLine("Result (Subtract) = "+res); } }OutputThis ... Read More

8K+ Views
The Decimal.Round() method in C# is used to round a value to the nearest integer or specified number of decimal places.SyntaxFollowing is the syntax −public static decimal Round (decimal d); public static decimal Round (decimal d, int decimals); public static decimal Round (decimal d, MidpointRounding mode); public static decimal Round (decimal d, int decimals, MidpointRounding mode);ExampleLet us now see an example to implement the Decimal.Round() method −using System; public class Demo { public static void Main(){ Decimal val1 = 9.00m; Decimal val2 = 15.29m; Decimal val3 = 394949845.14245M; ... Read More

252 Views
The Decimal.Remainder() method in C# is used to calculate the remainder after dividing two Decimal values.SyntaxFollowing is the syntax −public static decimal Remainder (decimal val1, decimal val2);Above, val1 is the dividend, whereas val2 is the divisor.ExampleLet us now see an example to implement the Decimal.Remainder() method −using System; public class Demo { public static void Main(){ Decimal val1 = 45.15m; Decimal val2 = 15.15m; Console.WriteLine("Decimal 1 = "+val1); Console.WriteLine("Decimal 2 = "+val2); Console.WriteLine("After Division = "+(Decimal.Divide(val1, val2))); Console.WriteLine("Remainder = "+(Decimal.Remainder(val1, val2))); ... Read More