0% found this document useful (0 votes)
18 views2 pages

C Sharp

The document provides an overview of C# programming concepts, including data types such as String, Integer, Boolean, Float, Double, and Decimal, along with their usage and syntax. It also covers essential functions like Console.WriteLine, Console.ReadLine, and various operators for arithmetic and logical operations. Additionally, it explains concepts like implicit and explicit conversion, constants, and escape sequences.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

C Sharp

The document provides an overview of C# programming concepts, including data types such as String, Integer, Boolean, Float, Double, and Decimal, along with their usage and syntax. It also covers essential functions like Console.WriteLine, Console.ReadLine, and various operators for arithmetic and logical operations. Additionally, it explains concepts like implicit and explicit conversion, constants, and escape sequences.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

C Sharp (C#)

1. Console.WriteLine: To input the data


2. Console.ReadLine: Output the data in console window
3. Console.ReadKey: Same as (console.readline)
4. String: Storage multiple characters in a single variable
5. Character(char): Storage only one character in a single
variable
6. {0}: Place Holder
7. Concatenation Syntax: “Your name is:” + name
8. Placeholder Syntax: “Your name is {0}”, name
9. Integer(int): Storage variable:- (A) Signed Integer-
Which takes both positive and negative value (B)
Unsigned Integer- Which takes only positive value
10. Parse: Transfer string to int (Because
“console.readline” only use for string output)
11. MaxValue: To know the maximum value of an integer
12. MinValue: To know the minimum value of an integer
13. Boolean(bool): Only show “True” or “False”
14. Float: Storage 7 digits e.g., 12.12345 (add prefix f)
15. Double: Storage 16 digits e.g., 12345678.12345678
(add prefix d)
16. Decimal: Storage 29 digits e.g.,
12345678901234.123456789012345 (add prefix m)
17. Escape Sequence:
18. (A) How to add double quotation “\“TEXT\””
19. (B) How to add single quotation “\‘TEXT’”
20. (C) How to add back slash “\\TEXT\\”
21. (D) How to add tab “\tTEXT”
22. (E) How to print in next line “TEXT\nTEXT\nTEXT”
23. Verbatim Literal(@): Character more readable by
using this
24. Implicit Conversion: Done by complier
25. Explicit Conversion: Done by developer in two ways
(a) by using the conversion data type; e.g., int. (b) by
using convert e.g., convert. ToInt32
26. Constant(const): Use for constant value i.e., [ public/
private/ protected {etc.} const ( data type)] [Constants
are declared for value types rather than reference
type]
27. Declaration: E.g., int = A
28. Initialization: E.g., A = 10
29. Declaration and Initialization in one line: E.g., int A =
10
30. DateTime.Now: Current time e.g.,
(“{0:d/D/f/F/g/G/m/t/T/y/Y}”) [ Here:- d is short date, D
is long date, f is full date/time (short time), F is full
date/time (long time), g is general date/time ] [ This
d,D,f,F,g,G,m,t,T,y,Y,yy,yyyy,ddd,etc. is date
specifiers ]
31. Sum: Use for additional
32. Sub: Use for subtraction
33. Divided(/): Use for division
34. Multiply(*): Use for Multiplication
35. Remainder(%): Use for remainder value
36. Relation Operators: (a) == (b) != (c) > (d) < (e) >=
(f) <=
37. Logical Operators: (a) Conditional And (&&)
[ Minimum 2 conditions ] (b) Conditional Or (||)
[ Minimum 2 conditions ]

You might also like