0% found this document useful (0 votes)
12 views8 pages

Understanding C# DateTime Class

Uploaded by

saberakhan1964
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)
12 views8 pages

Understanding C# DateTime Class

Uploaded by

saberakhan1964
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

1- DATETIME CLASS

1. 2. DEFINITION--------------------------------------------------(2)  ►DT is a struct in System nmespc tht alows storin date & tym values, ►it is imutble, opration retn new instanc.
3. SYNTAX
1) Default DateTime Format-------------------------------(1)  ► default format of DateTime : “yyyy-MM-dd hh:mm:[Link] tt”, ►yyyy: year, MM: month, dd:day, hh:hour, mm:minutes, ss: seconds, fff:milliseconds, tt:am/pm
2) Creating A DateTime Instance For A Date & Time (3)  ►DateTime dtName = new DateTime();, ►(yyyy, MM, dd) date only, ►(yyyy, MM, dd, hh, mm, ss, fff, DateTimeKind) date & time, ► DateTimeKind:Local, Utc, Unspecified
3) Creating A DateTime Property in A Class----------- (1)  ►pub cls Person{ pub string Name{get; set;} pub DateTime dob {get; set;} }, || ►var person = new Person(); [Link] = “faraz”; [Link] = [Link](“1991-10-11 [Link].999 am”); CW([Link]);
1.1- DATETIME INSTANCE PROPERTIES
1- [Link] 2- [Link] 3- [Link] 4- [Link] 5- [Link]
• get DT typ date only (time set to [Link]) • get int typ day of month (1-31). • get DayOfWeek as enum (day name). DayOfWeek typ • get int typ day of year (1-366) • get int typ month componnt (1-12)
• DateTime dt = new DateTime(2023, 10, 5, 14, 30, 0); • DateTime dt = new DateTime(2023, 10, 5); • DateTime dt = new DateTime(2023, 10, 5); • DateTime dt = new DateTime(2023, 12, 31); • DateTime dt = new DateTime(2023, 12, 31);
DateTime dateOnly = [Link]; int day = [Link]; DayOfWeek dayOfWeek = [Link]; int dayOfYear = [Link]; int month = [Link];
[Link](dateOnly); //10/5/2023 [Link] AM [Link](day); // Output: 5 [Link](dayOfWeek); // Output: Thursday [Link](dayOfYear); // Output: 365 [Link](month); // Output: 12
6- [Link] 7- [Link] 8- [Link] 9- [Link] 10- [Link]
• get int typ year (2025 etc) • get int typ hour (0-24) • get int typ minutes (0-60) • get int typ seconds(0-60) • get int typ millisecond
• DateTime dt = new DateTime(2023, 10, 5); • DateTime dt = new DateTime(2025,05,03,5,1,0); • DateTime dt = new DateTime(2023, 10, 5, 14, 30, 0); • var dt = new DateTime(2023, 10, 5, 14, 30, 36,962); • var dt = new DateTime(2023, 10, 5, 14, 30, 36,962);
int year = [Link]; int hour = [Link]; int minute = [Link]; int second = [Link]; int millisecond = [Link];
[Link](year); // Output: 2023 [Link](hour); // Output: 5 [Link](minute); // Output: 30 [Link](second); // Output: 36 [Link](millisecond); // Output: 962
1.2 DATETIME STATIC PROPERTIES
1- [Link] 2- [Link] 3- [Link] 4- [Link] 11- [Link]
• gets DT typ current local date & time • gets DT typ current utc date & tym. • get DTK typ kind: local, utc, coordinated or neither. • get DT typ todays date onlyv(time set to [Link]) • it gets time hh:mm:[Link] 4m gvn date time instance.
• DateTime now = [Link] • var now = [Link]; • var dt = new DateTime(2023, 10, 5, 14, 30, 36, 962); • DateTime dt = [Link]; • DateTime dt = [Link];
[Link]([Link]()); [Link]([Link]()); [Link]([Link]); //Unspecified [Link]([Link]()); [Link]([Link]());
// 03-05-2025 [Link] // 03-05-2025 [Link] • [Link]([Link]); //Local // 03-05-2025 [Link] //[Link].3789566
1.3 DATATIME STATIC METHODS
1- [Link](DateTime1, DateTime2) 2- [Link](year, month) 3- [Link](year) 4- [Link](valid datetime string) 5- [Link](DateTimeString)
• Compares two dates. Returns int -1, 0, or 1 • Returns int typ number of days in a month. • Checks if a year is a leap year return bool. • Converts a string to DateTime. Retrn DateTime • convrt gvn string 2 a datetime instnc.
• t1 < t2→ -1 • t1 == t2→0 • t1 > t2→ 1 • int days = [Link](2024, 2); • bool isLeap = [Link](2024); • string dateStr = "May 3, 2025"; • DateTime date = [Link]("2025-05-03");
• DateTime t1 = new DateTime(2025, 5, 3); [Link](days); [Link](isLeap); //true DateTime date = [Link](dateStr); [Link](date); //5/3/2025 [Link] AM
DateTime t2 = new DateTime(2025, 5, 4); // it retrns 29 as 2024 was a leap year [Link](date);
int result = [Link](t1, t2); 5- [Link](DateTimeString, formatString, FormatProvider)
[Link](result); //-1
• Parses a string using a specific format gvn by user. • datetime string and format string must match or err. • add using: [Link]
• provider: [Link] • providr 2: [Link] (opt)
• var date = [Link]("03-05-2025","dd- MM-yyyy", [Link]); [Link](date); // 5-3-2025 [Link] AM
1.4 DATETIME INSTANCE METHODS
TIMESPAN struct 1- [Link](years) +/- 2- [Link](months); +/- 3- [Link]([Link]); +/- 4- [Link]([Link]); +/-
• timspn is durtion of tym, study ltr, folwin r constrctrs • Add yrs 2 date ret DT. Adjusts February 29 in leap yr. • add months 2 date ret DT, adjst 4 end of month cases. • Adds days in +, -, fraction. Retn DateTime. • Adds hours to the DateTime retrn DT.
• TimeSpan(hh, mm, ss) • DateTime dt = new DateTime(2020, 2, 29); • DateTime dt = new DateTime(2023, 1, 31); • DateTime dt = new DateTime(2023, 10, 5); • DateTime dt = new DateTime(2023, 10, 5, 14, 0, 0);
• TimeSpan(dd,hh,mm,ss) DateTime newDt = [Link](1); DateTime newDt = [Link](1); DateTime newDt = [Link](2.5); //2 days 12 hours DateTime newDt = [Link](3.5); //Add 3h 30 min
• TimeSpan(dd,hh,mm,ss,ms) [Link](newDt); // 2/28/2021 [Link] AM [Link](newDt); //2/28/2023 [Link] AM [Link](newDt); // 10/7/2023 [Link] PM [Link](newDt); //10/5/2023 [Link] PM
• var s = new TimeSpan(cntrctr);
5- [Link](dminutes); 6- [Link](dseconds); 7- [Link](dms); 8- [Link](timeSpan); 9- [Link](DateTime value);
• Adds minutes to the DateTime, retn DT • Adds seconds to the DateTime retn DT • Adds milliseconds to the DateTime retn DT. • add timespn to dt obj retrn DT • Compares two dates return -1, 0, 1 in int
• DateTime dt = new DateTime(2023, 10, 5, 14, 30, 0); • DateTime dt = new DateTime(2023, 10, 5, 14, 30, 0); • DateTime dt = new DateTime(2023, 10, 5, 14, 30, 0); • var dt = new DateTime(2023, 10, 5) • t1 < t2→ -1 • t1 == t2→0 • t1 > t2→ 1
DateTime newDt = [Link](45); //Add 45 min DateTime newDt = [Link](45); DateTime newDt = [Link](1500); //1.5 sec [Link](new TimeSpan(1, 0, 0, 0) • DateTime dt1 = new DateTime(2023, 10, 5);
[Link](newDt); // 10/5/2023 [Link] PM [Link](newDt); // 10/5/2023 [Link] PM [Link](newDt); //10/5/2023 [Link].500 PM //10/6/2023 [Link] AM DateTime dt2 = new DateTime(2023, 10, 6);
int result = [Link](dt2);
[Link](result); // Output: -1
10- [Link](DateTime value); 11- [Link](); 12- [Link](); 13- [Link](); 14- [Link]();
• Checks if two DateTime instances are equal. (sme obj) • cnvrt DateTime 2 str usin default frmt ret string • cnvrts DT 2 short time retrn string.(hh:mm AM/PM) • cnvrt DT 2 long time retrn string.(hh:mm:ss AM/PM) • cnvrt DT 2 short date, retrn string (dd-MM-yyyy)
• DateTime dt1 = new DateTime(2023, 10, 5); • DateTime dt = new DateTime(2023, 10, 5, 14, 30, 0); • DateTime dt = new DateTime(2023, 10, 5, 14, 30, 0); • DateTime dt = new DateTime(2023, 10, 5, 14, 30, 0); • DateTime dt = new DateTime(2023, 10, 5);
DateTime dt2 = new DateTime(2023, 10, 5); [Link]([Link]()); [Link]([Link]()); [Link]([Link]()); [Link]([Link]());
bool isEqual = [Link](dt2); // Output: "10/5/2023 [Link] PM" (culture-dependent) //Output: "2:30 PM" // Output: "[Link] PM" // Output: "10/5/2023"
[Link](isEqual); // Output: True
14- [Link](); 15- [Link](); 16- [Link](); 17- [Link](DT value);
• cnvrt DT 2 long date ret str.(day, month, dd, yyyy) • cnvrts local DT 2 UTC if (kind: locl/unspcifid) ret DT. • cnvrt Utc tym to locl comp tym if tym is alrdy in Utc • it calclte difrnc btwn 2 date & retun TimeSpan
• DateTime dt = new DateTime(2023, 10, 5); • DateTime localTime = [Link]; • DateTime localTime = [Link]; • DateTime date1 = new DateTime(2023, 6, 15);
[Link]([Link]()); DateTime utcTime = [Link](); DateTime utcTime = [Link](); DateTime date2 = new DateTime(2023, 6, 10);
// Output: "Thursday, October 5, 2023" [Link](utcTime); //comptr tym 2 utc [Link]([Link]()); TimeSpan difference = [Link](date2);
[Link](difference); // 5.[Link]
2- MATH CLASS

►DEFINITION-------------------------------------------------- (1)  ►Math is a predfnd sttc cls in system namespace with sttc mthds 2 perform mathematical operations

2.1 METHODS OF MATH CLASS


1- [Link](num1, num2) 2- [Link](num1,num2) 3- [Link](num1, num2) 4- [Link]( num) 5- [Link](num)
• it retrn num1 raised to num2 in double. • it retrn minimum no. in givn two nos in double. • it retrn maximum value among 2 nos in double • it rounds down the gvn number and retrn in double • it rounds up gvn no. and return in double
• double x = [Link](2,3); //8 • double mini = [Link](4.8, 5.9); //4.8 • double x = [Link](4.8, 5.9); //5.9 • double x = [Link](10.98) //10 • double x = [Link](10.87777); //11
6- [Link](num) 6.1- [Link](num, deciPlaces) 7- [Link](num) 8- [Link](number) 9- [Link](int a, int b, out int result);
• it rounds up or down & retrn number in double. • it rounds the decimal part of intrest. Retrn double. • it chks num is +ve or -ve, ret in double • it retrn positv sme no evn if gvn negtv no. ret double. • it divide a/b ret int quotient, out int remainder.
• double x = [Link](5.8)//6, Round(5.4)//5 • (2.2344,2)→2.23: luks 3rd no if >5 round down deci pr • if +ve ret 1, if -ve ret -1, if 0 ret 0. • double x = [Link](-233); //233 • int q = [Link]( 7, 2, out int rem);
• (2.2355,3)→2.236:4th no in decimal >5 • double x = [Link](-23); //-1 //q = 3, rem = 1
double x = [Link](23.59993, 3); //23.6
10- Remaining Methods
• [Link](x) – Returns the square root of x in double • [Link](x) – Retn natural (base-e) log of x in double •[Link](x) – Ret sine of angle x (in radi) in double • [Link](x) – Ret the tan of angle x (in rad) in double • [Link](x) – Ret arctangent of x (in rad) in double
• [Link](x) – Returns e raised to x power in double • Math.Log10(x) – Retn base-10 log of x in double • [Link](x) – Ret cosine of angle x (in rad) in double • [Link](x) – Ret arcsine of x (in rad) in double • [Link](x): Trunct dcml prt, retn only int part.
• [Link](x) – Ret arccosine of x (in rad) in double [Link](3.9) → 3
3- NUMBER SYSTEMS

1. DECIMAL NUMBER SYSTEM


1) Definition---------------------------------------------------- ►default system for human readable numbers.
(1)  ►decimal number system is base 10 (0-9).
2) Base used---------------------------------------------------- (1) 
2. BINARY NUMBER SYSTEM ►fundamental system for computer operation like data storage , logic gates
1) Definition --------------------------------------------------- (1)  ►binary number system is base 2 (0-1)
2) Base used---------------------------------------------------- (1)  ►[Link](number, base); ►int num = 13; string bin_num = [Link](num,2); //“1101”
3) Decimal to Binary Conversion--------------------------(2)  ►Conver.ToInt32(binaryStr, fromBase); ►string bin_num = “1101”; int dec_num = Convert.ToInt32(bin_num,2); //13
4) Binary to Decimal Conversion--------------------------(2)  ►literals means direct value entred, if you wnt to enter binary num directly then prefix with 0b, ►int x = 0b1101; [Link](x); //13
5) Binary Literal & Decimal Conversion---------------- (2) 
3. OCTAL NUMBER SYSTEM ►older system used in computer for some operations like file permission, now largely replaced with hexa decimal.
1) Definition---------------------------------------------------- ►octal number system is base 8 (0-7)
(1)  ►[Link](number, base); ►int num 289; string bin_num = [Link](num, 8); // “441”
2) Base used---------------------------------------------------- (1)  ►Convert.ToInt32(octalString, fromBase); ►string oct_num = “441”; int dec_num = Convert.ToInt32(oct_num, 8); //289
3) Decimal to Octal Conversion--------------------------- (2)  ►octal literals are not possible in c#
4) Octal to Decimal Conversion--------------------------- (2) 
5) Octal Literal & Decimal Conversion------------------ (1)  ►a sytem using 0-9 & a-f for representing a number, widely used in memory adressing, color codes, binary shorhands
4. HEXADECIMAL NUMBER SYSTEM ►hexadecimal is a base 16 system (0-9,a-f)
1) Definition --------------------------------------------------- (1)  ►[Link](num, 16); ►int num = 742; string hex_num = [Link](num, 16); // “2e6”
2) Base used---------------------------------------------------- (1)  ►Convert.ToInt32(hexString, fromBase); ►string hex_num = “2e6”; int dec_num = Convet.ToInt32(hex_num,16); //742
3) Decimal to Hexadecimal Conversion------------------ (1)  ►int x = 0x2e6; ►[Link](0x2e6); //742
4) Hexadecimal to Decimal Conversion------------------ (2) 
5) Hexadecimal Literal & Decimal Conversion-------- (2) 
4- ENCODING

1. DEFINITION-------------------------------------------------- (2)  ► representation of characters into numbers or any other format is encoding, ►encoding functionality present is [Link] cls & [Link] namespace.
2. ASCII------------------------------------------------------------ (4)  ►american standard code for information interchange, ►older way to represent chars in numbers, ►support only english characters, ►almost all keyboard characters were included (128 chars, 7bit(1byte) for each char)
3. UNICODE------------------------------------------------------ (4)  ►universal code, ►newer way to represent chars in numbers, ►supports all international language chars with ascii, ►almose 145k chars available & almost every char takes 2 bytes rarely 4 bytes
4. ASCII CODE ENCODING
1) Convert Characters to ASCII Code-------------------- (1)  ►char chr = ‘A’; byte asciiChr = (byte)chr; //64
2) Convert ASCII to Character----------------------------- (1)  ►byte asciiChr = 64; char chr = (char)asciiChr; // ‘A’
3) Convert Between byte[] (ASCII code) & String
1- byte[] of numbers---------------------------------------(2)  ►any byte[] num you have or created ex: byte[] x = new byte[]{56,43,87,92}, ►byte[] of 0-127 filld via for loop, byte[] byte = new bytes[128]; for(int i =0; i<128, i++){ bytes[i] = i; } // bytes = [0,1,2,…127]
2- Converting byte[] to String--------------------------- (2)  ►[Link] cls has predfnd sttc mthd, ►[Link](byte[]);→retrn string, ascii is prop, ► ex: byte[] x = new byte[]{56,43,87,92} string s = [Link](x) //s= 8+W\
3- Output As Strict ASCII------------------------------- (2)  ►some ascii char r nt suprtd recntly 2 avoid thm v cn us consol prop like: [Link] = [Link]; ►this means v hv to print all the chars as ascii format only
4- Converting String to byte[]--------------------------- (2)  ►[Link] cls has predfnd sttc mthd, ►[Link](string);→retrn byte[], ascii is prop, ►string s = "how are you ?"; byte[] b = [Link](s);//[104,111,119,32,97,114,101,32,121,111,117,32,63]
5. UNICODE ENCODING
1) How To Write Sting Using Unicode
1- Direct Copy---------------------------------------------- (1)  ”
►u cn dirctly copy any text or chars in other language ans paste as a string literals, ►string s = “‫; فراز‬ cw(s); →watch using debuggin: ‫فراز‬
2- By Writing Using Unicode---------------------------- (1)  ►u cn put unicod in the string literals prefxin it wid \u for each unicod, ►string s = "\u0641\u0631\u0627\u0632" cw(s); →watch using debuggin ‫فراز‬
2) Convert Char to Unicode--------------------------------- (3)  ►convrt chr to int, ►ensure to add U+ string and int value, ►format specifier {var:X4} to ensure 4 digit

3) Conversion Between byte[] Unicode & String


1- Converting String to Byte Array-------------------- (1)  ►encoding cls hv prdfnd sttc mthd, ►[Link](string); → string s = “how are you ?”; byte[] b = [Link](s); // [104,0,111,0,119,0,32,0,97,0,114,0,101,0,32,0,121,0,111,0,117,0,32,0,63,0,]
►Byte[] Of Ascii Chars------------------------------- (3)  ►in unicod each char is of 2 byts (some 4 byts), hence in byte[] combntion of 2 elmnt form one char, ►4 englsh evry 2nd elmnt is 0, 4 othr lang both byts r filled
2- Converting Byte[] of Unicode to String------------ (2)  ►Encoding cls hv predfnd sttc methd, ►[Link](byte[]); → byte[] b = [104,0,111,0,119,0,32,0,97,0,114,0,101,0,32,0,121,0,111,0,117,0,32,0,63,0] string s = [Link](byte[]);//how are you?
5- [Link] NAMESPACE NOT COMPLETE

1. 2. [Link] NAMESPACE----------------------------(1)  ►[Link] namespace contains various classes to operate on files on the system and manipulate them.
3. CLASSES OF [Link]---------------------------- (11)  ►File, ►FileInfo, ►Directory, ►DirectoryInfo, ►DriveInfo, ►FileStream, ►StreamWriter, ►StreamReader, ►BinaryWriter, ►BinaryReader, ►FileNotFoundException
5.1- FILE CLASS

1. 2. DEFINITION----------------------------------------------(2)  ►file is sttc cls tht manplt files, ►it is present in [Link] namespace hence v hv 2 import it by using.
3. FILE PATH------------------------------------------------ (3)  ►file path is str having “driveName/folderName/fileName”, ►file path contening singl ‘\’ r cnvrtd into doubl ‘\\’ 2 avoid escp seqnc. ►file path cntening singl ‘\’ cn be usd as it is with verbatim str whch starts with @ “”.
METHODS OF FILE CLASS (all static)
1- [Link](fileNameWidPath); 2- [Link](fileNameWidPath) 3- [Link](fileNmeWidPath, psteFileNameWidPath) 4- [Link](fileNmeWidPath, mov/renmeFileNameWidPath) 5- [Link](fileNameWidPath)
• crets & opn / ovrwrite & opn file @ a spcfc path. • chks file exists or nt retrn bool true if exists else false. • it wil copy file in same or difrnt foldr withn sme • it cn eithr renme & move a fyl 4m 1 location 2 • file @ prticulr path gets deleted
• usin ths mthd files r open so v hv 2 clos is by .Close(); • bool x = [Link](@“D:\practice\[Link]”); drive. anthrBt wthn sme drive. • [Link](@ “D:\practice\india2”);
• [Link]("D:\\practice\\[Link]").Close(); [Link](x); // true • file path here is where to copy the file. • 2 jst renme, mov fyl wthn sme foldr wid dif nme
• if file wid sme nme alredy prsnt, it gts overwritten. • [Link](@“D:\practice\[Link]”, • if wnt 2 move fyl in anthr foldr giv tht foldr nme.
@“@D:\practice\[Link]”); • if wnt 2 renme & move do prvious 2 options.
6- [Link](fylNmeWidPth, strText) 7- [Link](fileNameWidPath) 8- [Link](fylNameWidPth, Str[]/list) 9- [Link](fileNameWidPath) File.(Open, OpenRead, OpenWrite)
• fyl if nt prsnt gts cretd and text is writn on it. • read txt 4m fle & retun in string. • if fyl nt prsnt, gts [Link] mem is aded in new lyn • it reads all lines and retrn a string array of content. • learn it in file stream cls
• string fileName = @"D:\practice\[Link]"; • string read = [Link](@“D:\practice\[Link]”); • var filePath = @ “D:\practice\[Link]”; • string[] s = [Link](@ • [Link](path, FileMode, FileAccess)
string text = "india is my country"; Cw(n); var animals = new list<string>(){“a”, “b”, “c”}; “D:\practic\[Link]”);
[Link](fileName,text); [Link](filePath, animals); • use foreach to cw.
10- [Link](path, FileMode, FileAccess) 11- [Link](path) 12- [Link]( string path)
• Opens the file in specified file mode with specified file access • Opens the file in ‘Open’ mode and returns a new • Opens the file in ‘OpenOrCreate’ mode and returns
permission and returns a new object of FileStream type. object of FileStream type. an object of FileStream type.
5.2FILEINFO CLASS

1. 2. DEFINITION--------------------------------------------- (2)  ►it is a instance cls in [Link], ►using this cls u cn manipult the files like create, open, copy, move, delete, ►2 use this class u ned 2 cret an obj of this cls usin: FileInfo obj = new FileInfo(fileNamePath);
3. FILEINFO CLASS OBJECT---------------------------(2) ` ►every fileinfo cls obj point to its file, it means for every file there is a fileinfo obj tht contains path of tht file give in constructor
4. ADVANTAGE OVER FILE CLASS------------------ (2) ` ►with file cls 4 evry mthd v hv 2 mntion File cls & most of tym source path, here source pth is already tken by obj & no ned 2 mention cls name, ►4 one tym oprtn use file cls for multiplr oprtion use fileinfo
INSTANCE METHODS OF FILEINFO CLASS
1- [Link]() 2- [Link](paseFileNamePath, bool overwrite) 3- [Link](mov/renmeFileNameWidPath) 4- [Link](); 5- [Link](FileMode, FileAccess)
• it create a file & also opn it, so v hv 2 clos it. • it wil copy file in same or difrnt foldr wthn sme drive. • it cn renme/mov fyl wthn same drive 4m 1 foldr 2 • [Link](); will delete the file of its reference path. ►Opens the file at specified file mode and specified
st
• 1 v hv 2 cret fileInfo obj. • it wil cret anthr instnc & retrn the same othr file access permission & creates and returns an object
• FileInfo x = new FileInfo(@ “D:\practice\[Link]”); • FileInfor y = [Link](@ “D:\practice\[Link]”); Retn void with prvious file path copies to ths obj. of FileStream class that can write / read the file data.
• [Link]().Close(); • optional bool if mentioned true, if file exist in • if wnt 2 jst renme, mov fyl wthn sme foldr wid dif
►Creates the file at specified path & creates and returns an destination will get overwrite, else exception nme 5- obj.(open, opentext,openread, openwrite)
object of FileStream class with ‘Create’ mode, which can write ► Copy d fyl in2 new destintion path. It retn an object • if wnt 2 move fyl in anthr foldr giv tht foldr nme. • learn it in file stream class.
data to the same file of FileInfo cls, that represents the newly created fyl. • if wnt 2 renme & move do prvious 2 options.
6- [Link]( ) 7- [Link]( ) 8- [Link]( ) 9- [Link]( ) 10- obj. OpenText( )
►Opens the file in 'Read' mode & creates and returns an ►Opens the file in 'OpenOrCreate' mode & creates ► Opens the file in 'Create' mode & creates and ► Opens the file in 'Append' mode & creates and ► Opens the file in 'Open' mode & creates and
object of FileStream class that can read the file data. and returns an object of FileStream class that can returns an object of StreamWriter class that can write returns an object of StreamWriter class that can returns an object of StreamReader class that can
read the file data. text to the file write the appended text to the file read text from the file.
PROPERTIES OF FILEINFO CLASS (provides additional info about files)
1- [Link] 2- [Link] 3- [Link] 4- [Link] 5- [Link]
• string prop, get name of the file • string prop, gets full name as path of the file • string prop, gets folder name in whch file is present • bool prop, if exist gets true else false • string prop, gets extension name of the file
• FileInfo blurr = new • string fullName = [Link]; • string folderName = [Link]; • bool x = [Link]; • string extensionName = [Link];
FileInfo(@”D:\practice\[Link]”); • string fullName = [Link]; [Link](folderName); //D:\ • bool x = [Link]; [Link](extensionName); //.txt
• string name = [Link]; [Link](fullName); //D:\practice\ practice [Link](x); //true
[Link](name); //[Link] [Link]
6- [Link] 7- [Link] 8- [Link] 9- [Link];
• byte prop gets size of file in bytes. • DateTime prop gets last modification time • DateTime prop gets creation time of the file • DateTime prop gets last time of the file handling
• byte size = [Link]([Link]); OR • DateTime t = [Link]; • DateTime ct = [Link];
var size = [Link]; [Link]([Link]()); [Link]([Link]());
[Link](size); //15 // 06-05-2025 [Link] // 06-05-2025 [Link]
5.3- DIRECTORY CLASS

1. 2. DEFINITION------------------------------------------------- (1)  ►predefnd sttc cls in [Link] through which you can manipulate directories (folders)
3. LEARN THROUGH TASK-------------------------------- (7)  ►cret foldr “countries”in a foldr, ►cret foldr “india”, “UK”, “USA” in country foldr, ►cret 3 files:txt “capital”, “sports”, “population” in each country fldr, ►mov/renme countries foldr as world, ►lst fyls of world,
►list foldr of world folder, ►delete world foldr including its fyls & subfyls
METHODS OF DIRECTORY CLASS
1- [Link](dirctryNameWidPath) 2- [Link](dirNameWidPath,mov/renmeDirNmeWidPath) 3- [Link](dirctryNameWidPath, pttrn) 4- [Link](directoryNameWidPath) 5- [Link](dirNameWidPath, bool recursv)
• it wil cret foldr @ gvn path, lst itm is name • it cn renme/mov dir wthn same drive 4m 1 locat 2 • all files paths are return as a string array. • all director paths are return as string array • if dir is empty only path will delete is as bool is opt
• [Link](@"D:\practice\countries"); othr • string[] files = • string[] folders = • if dir conten somthin (path, true) will delte it with
• for cretin sub foldr give cmplt path @ lst give foldr • 2 jst renme, mov dir wthn sme path wid dif nme [Link](@"D:\practice\world"); [Link](@"D:\practice\world"); its content else v get excption sayin dir conten
Name u wnt to cret. • 2 move dir in anthr loc giv tht location path. somthin.
• for creting files in sub folder u cn use File/FileInfo • if wnt 2 renme & move do prvious 2 options. // D:\practice\world\[Link] // D:\practice\world\india 6- [Link](dirNameWidPath)
• [Link](@"D:\practice\countries"); • [Link](@"D:\practice\countries", D:\practice\world\[Link] D:\practice\world\UK • return true if directory exists else false.
•[Link](@"D:\practice\countries\india"); @"D:\practice\world"); D:\practice\world\[Link] D:\practice\world\USA • boole exists =
•[Link](@"D:\practice\countries\USA"); [Link](@"D:\practice\world"); //false.
• [Link](@"D:\practice\countries\[Link]").Close(); • additionally v cn gv search pattern in second arg
• [Link](@"D:\practice\countries\[Link]").Close(); , “*.txt”→meaning *(all) files tht have .text
•[Link](@"D:\practice\countries\
[Link]").Close();

5.4- DIRECTORYINFO CLASS

1. 2. DEFINITION--------------------------------------------------(1)  ►predfnd instance cls of [Link] to manipulate the directories (folders)


3. DIRECTORYINFO CLASS OBJECT------------------- (1)  ►every directoryinfo cls obj point to its directory, it means for every directory there is a directoryinfo obj tht contains path of tht file given in constructor
4. LEARN THROUGH TASKS-------------------------------(7)  ►cret foldr “countries”in a foldr, ►cret foldr “india”, “UK”, “USA” in country foldr, ►cret 3 files:txt “capital”, “sports”, “population” in each country fldr, ►mov/renme countries foldr as world, ►lst fyls of world,
►list foldr of world folder, ►delete world foldr including its fyls & subfyls
DIRECTORYINFO CLASS METHODS
1- [Link]() 2- [Link](“nameOfFolder”) 3- [Link](mov/renmeDirNameWidPath) 4- [Link]() 5- [Link]()
• 1st v hv to cret an obj of directoryinfo cls • 4 foldr inside folder v creatd ths, mak anthr foldr insd • it cn renme/mov dir wthn same drive 4m 1 locat 2 othr • it returns the files in the foldr in FileInfo[] not string[] • it retrn all the folders in DirectoryInfo[] not string[]
• DirectoryInfo x = new DirectoryInfo(dirNmewidPth); • [Link]("india"); Retn void with prvious dir path copies to this obj. • FileInfo[] files = [Link](); • DirectoryInfo[] folders = [Link]();
• DirectoryInfo x = new [Link]("UK"); • 2 jst renme, mov dir wthn sme foldr wid dif nme foreach (var item in files) foreach (var item in folders)
DirectoryInfo(@“D:\practice\countries”); [Link]("USA"); • 2 move dir in anthr foldr giv tht foldr pth + name. { { [Link]([Link]);}
[Link](); //folder created • to creat files inside folder v cn use file or fileinfo cls • 2 renme & move do prvious 2 options. [Link]([Link],[Link]); 6- [Link](true) :bul recrsive = true
• new FileInfo([Link]+@“[Link]”).Create().Close(); • [Link](@“D:\practice\world”); }
• it will delete the folder completely if mention true
• new FileInfo([Link]+@“[Link]”).Create().Close();
• if not mention true and folder contain somthin
• new FileInfo([Link]+@“[Link]”).Create().Close();
It will throw excpt
DIRECTORYINFO CLASS PROPERTIES (provide additional info about folder)
1- [Link] 2- [Link]; 3- [Link]; 4- [Link]; 5- [Link];
• bool prop gets true is folder exist • string prop gets name of folder. • string prop, gets full path of the folder. • DirectoryInfo type prop gets parent folder name • DirectoryInfo typ prop gets root drive path
• create a folder world through create mthd. • string name = [Link]; • string fullName = [Link]; • DirectoryInfo parentName = [Link]; • DirectoryInfo Root = [Link];
• bool y = [Link]; [Link](name); //world [Link](fullName); //D:\practice\world [Link](parentName); //practice [Link](Root); //D:\
[Link](y); //true
[Link] 7- [Link]; 8- obj. CreationTime; 9- [Link] Exists
• DateTime type prop gets modific date of foldr • DateTime typ prop gets last access time of folder. ►Represents date and time of directory creation ►Determines whether the directory exists in the disk or
• DateTime lmt = [Link]; • DateTime lat = [Link];
[Link]([Link]()); [Link]([Link]()); not.
// 07-05-2025 [Link] // 07-05-2025 [Link]
5.5- DRIVEINFO CLASS

1. 2. DEFINITION------------------------------------------------ (1)  ►predefnd instance cls to manipulate and acess info about drives of the hard disk.
3. DRIVEINFO CLASS OBJECT----------------------------(2)  ►evry drive hv a obj reference through whch it is accessed, ►DriveInfo obj = new DriveInfo(“driveName:”); ►DriveInfo x = new DriveInfo(“d:”);
PROPERTIES OF DRIVEINFO CLASS
1- [Link] 2- [Link]; 3- [Link] [Link] 5- [Link]/1024/1024/1024 [bytes 2 gb]
• string type prop gets drive name. • DriveType typ prop gets whthr drive is fixd or rmovbl • string typ prop gets drive name. • object typ prop gets roo directory • long typ prop gets totl size of drv in bytes. V hv 2
• string name = [Link]; • DriveType fixRemove = [Link]; • string volumeLabel = [Link]; • object root = [Link]; cnvrt in into kb, mb, gb by dividing it by 1024
[Link](x); // D:\ [Link](fixRemove); // Fixed [Link](volumeLabel); //New Volume [Link](root); //D:\ • long size = [Link] / 1024 / 1024 / 1024;
[Link](size); // 300
[Link]
• long typ prop gets available free spce in bytes. We
hv 2 cnvrt it in kb, mb, gb by dividing by 1024
• long freeSpace = [Link] /1024/1024/ 1024;
[Link](freeSpace); //300
5.6- FILESTREAM CLASS

1. 2. DEFINITION-------------------------------------------------- ►prdefnd instance cls to read or write content on files.


(1)  ►wid fyl cls v cn prfrm read write oprtion useful in single shot oprtion, ►file stream cls alows reading writing along with othr program execution.
3. ADVANTAGE OVER FILE CLASS--------------------- (2)  ►while writing str needs to be cnvrtd in2 byte array, ►while reading the file byte array needs to be convertd into string
4. RULES OF FILESTREAM CLASS---------------------- (2)  ►evry fyl is refrncing an obj, ►FileStream obj = new FileStream(filePath, fileMode, fileAccess); ,►filestrm hv many cnstrctrs but 1 mentioned is enough 4 most of the work we need,► alwys cret 1 strm 4 writin & 1 for readin
5. OBJECT OF FILESTREAM CLASS-------------------- (2) 
1) Create Using Constructor ►file path we used till now i.e. fileNameWithPath
1- filePath-------------------------------------------------- (1)  ►file mode is a predefnd enum. We hv 2 choose option 4m it. Like [Link], [Link] etc
2- FileMode------------------------------------------------(1)  ►file access is also another enum. We hv 2 choose options 4m it like [Link], [Link], [Link], ►FileStream x = new FileStream(filePath, [Link], [Link]);
3- FileAccess----------------------------------------------- ►File cls hv mthd Create(filePath); whch intrnlly create file stream obj with FileMode as create & file access as write, ►FileStream x = [Link](filePath);, ►prefer using constructor way
(1) 
2) Create Using File Class---------------------------------- (3)  ►specifies OS to create new file with given name, ►if file name already exists throw an Ioexception.
6. FILEMODE ENUMERATION ►specifies OS to create new file with given name, ►if file name already exists it will be overwritten.
1) CreateNew--------------------------------------------------(2)  ►specifies OS to open an existing file, ►if file doesn’t exist FileNotFound exception is thrown.
2) Create------------------------------------------------------- (2)  ►specifies OS to open an existing file, ►if file doesn’t exist , a new file will be created.
3) Open--------------------------------------------------------- (2)  ►specifies OS to open an existing file and clear the content, ►if file doesn’t exist, FileNotFount exception is thrown.
4) OpenOrCreate---------------------------------------------(2)  ►specifies OS to open an existing file and go to the end of the file in order to write content at the end.
5) Trucate------------------------------------------------------ (2) 
6) Append------------------------------------------------------(1)  ►it is used to read content from an existing file
7. FILEACCESS ENUMERATION ►it is used to write content to a file.
1) Read--------------------------------------------------------- (1)  ►it can be used for both read and write.
2) Write-------------------------------------------------------- (1) 
3) ReadWrite-------------------------------------------------- (1) 

METHODS OF FILESTREAM CLASS


1- [Link](strByte[], offset, count) 2- [Link](fylbyte[], offset, count)
• byte[] is str convrtd into byte[]. • byte[] holds the content of file ([Link]file size)
• offset is start index of byte[] to write on file • offset is index of byte[] to read
• count is end index of byte[] upto wch v wnt 2 write. • count is end indx of byte[] upto which v wnt 2 read.

1) string filePath = @"D:\practice\[Link]"; 1) string filePath1 = @"D:\practice\[Link]";


2) string text = "how are you"; 2) var re = new FileStream(filePath1, [Link], [Link]);
3) byte[] str2byte = [Link](text); 3) var buffer = new byte[[Link]];
// creating a file and writing on it and closing it 4) [Link](buffer, 0, (int)[Link]);
4) var wr = new FileStream(filePath, [Link],[Link]); 5) var text = [Link](buffer);
5) [Link](str2byte, 0, [Link]); 6) [Link]();
[Link](); [Link](text);

5.7- STREAM WRITER AND STREAM READER

1. 2. DEFINITION--------------------------------------------------(3)  ►predfnd instanc cls which alows 2 write strings on file directly and read the string from file directly, ►it does all the conversion from byte[]→string or string→byte[] internally., ►works only with text files
3. OBJECT OF STREAMWRITER CLASS---------------(4)  ►StreamWriter obj = new StreamWriter(filePath); ►new StreamWriter(filepath, bool append);, ►new StreamWriter(filePath, bool append, Encoding encoding);, ►new StreamWriter(Stream stream);[cret wrtr 4 crnt strm]
4. OBJECT OF STREAMREADER CLASS-------------- (2)  ► StreamReader obj = new StreamReader(filePath), ►new StreamReader(Stream stream)
METHODS OF STREAMWRITER METHODS OF STREAMREADER
1- [Link](“text”) 2- [Link](“text”) 1- [Link](); 2- [Link](emptyBuffr[],indxno2kep, chr2read) 3- [Link]()
►directly writes text on file with nw lyn, Write(wtht) ►writes without going to next line ►reads text from start to end retrn string. ►char[] buffr = new char[char2read]; ►read 1 line from the text and return as string
►after writing [Link](); [Link](); ►after writing [Link](); [Link](); ►after reading, [Link]();, [Link](); ►int char_left = [Link](buffr,0,10); ►StreamReader re = new StreamReader(path);
►use using statemnt to avoid put close, and dispose ►use using statemnt to avoid put close, and dispose ►use using statemnt to avoid put close, and dispose ►buffr=empty[], 0=index @ 10 chr info is kept, 10= ►string s = [Link]();
►[Link](s);
chars to read ►after reading, [Link]();, [Link]();
►string s = new string(buffr); cw(s) ►use using statemnt to avoid put close, and dispose
►cursor waits at10th char reapeat code to reade nxt 10
►this methd also return int charRead so use in loop
►after reading, [Link]();, [Link]();
►use using statemnt to avoid put close, and dispose
6- SERIALIZATION & DESERIALIZATION

1. 2. SERIALIZATION-------------------------------------------- (1)  ►conversion of object (any obj, instance of cls) into format (json format, xml, bin) so tht it can be easily stord, sent
3. DESERIALIZATION----------------------------------------(1)  ►conversion of json, xml format data back into an object, instance of cls
4. JSON SERIALIZATION
1) Namespace To Use---------------------------------------- (1)  ►using [Link], ►if error occurs in using statement v hv 2 add reference to dll file, Rclick on project→Add→Reference→Assembly(expnd it)→check on [Link]
2) Class For Json Serialization---------------------------- (1)  ►in [Link] namespace there is a predefined class JavaScriptSerializer. This cls is used to serialize an obj into json and json into obj.
3) Json Format------------------------------------------------(1)  ►Object: { Field1 = value1; Field2 = value2; Field3 = value3 }, ►Json data: { “Field1”: “value1”, “Field2 : “value2”, “Field3”: “value3”} if value is number “” not required.
JSON SERIALIZATION
1- make your class serializable [Serializable] 2- make object of your serializable class in main 3- make object of serialization class 4- serialize class object using serialize method 5- write json data to a file to check conversion
[Serializable] Var customer = new Customer(); 1- import [Link] [Link](classObject); → string filePath = @“D:\practice\[Link]”;
public class Customer [Link] = 1; 2- add reference to [Link] dll • obj: JavaScirptSerializer object → StreamWriter x = new StreamWriter(filePath);
{ [Link] = “Nancy”; 3- make object of JavaScriptSerializer class. • classObject: any object of your serializable class → [Link](jsonData);
public int CustomerId {get; set;} [Link] = 20; • this method returns string → [Link]();
public string CustomerName{get; set;} → var javaSerializer = new JavaScriptSerializer();
public int Age {get; set;} Customer → string jsonData = [Link](customer);
} CustomerId 1
CustomerName “Nancy”
• [Serializable] ensures that this class obj can be Age 20
conveted into any other format like xml, bin, json.
JSON DESERIALIZATION
1- get json data in string form 2- deserialize data into class object 3- confirm deserialization using new object
• get it through api or from any file. In this case file. [Link](string data, typeof(ClassName)); [Link]([Link]);
→ string filePath = @“D:\practice\[Link]”; • make new or use old JavaScriptSerializer object [Link]([Link]);
→ var reader = new StreamReader(filePath); • string data: jason data in string format [Link]([Link]);
→ string jsondata = [Link](); • we cnt use cls name as a prmtr hence use typeof(CN)
• this mthd retrns type is object. We hv to type cast it in • if they matches with customer1 than deserialization
obj of our clss (data, typeof(ClsNme)) as ClassName; done successfully.
Customer customer2 = [Link]
(jsondata, typeof(Customer)as Customer):

7- EXCEPTION HANDLING
1. TYPES OF ERRORS IN PROGRAMMING
1) Compile Time Errors------------------------------------- (1)  ►err due 2 syntactcl mistks eg. Missin semicln, str in nt doubl quots, braces nt closd., ►cn b easily tackld
2) Run Time Error------------------------------------------- (1)  ►err nt at a tym of cmpltion but execution. ,►occur due 2 wrng implmnt of logic, wrng i/p supplied, missing resourcs etc., ►thes errs trmnt prgrm abrptly as furthr code in the progrm dos nt run
3) Exceptions-------------------------------------------------- (3)  ►Excption is a clss, ►whn runtym err occur, bsed on typ of err an exception objct is cretd tht trmint furthr code execution unless hndled, ►4 evry typ of runtym err ther is a excption cls derivd 4m parent excption cls Exception
2. EXCEPTION CLASS
1) Definition ---------------------------------------------------(1)  ►Parent of all exception clss it contain all logc 4 abnrml trmntion & hv a virtual readonly prop “message” 2 display err msg evry chld cls cn ovrrd thid prop
2) Child Classes of Exception Class
1- ApllicationException---------------------------------- (1)  ►non fatal errs, progrmr cn mke thr own excption
2- SystemException--------------------------------------- (3)  ►fatal errs, automtcly gnrtd by clr, ►all excption we gnrly see like IndexOutOfBound, FormatException, ArithmaticException(DivideByZeroExcp, OverFlowException) are present in this., ►thy cn ovrrd message prop of excp
3. SYSTEM EXCEPTION HANDLING
1) Definition ---------------------------------------------------(1)  ►proces of stoping abnrml trmintion of prgrm, giv usr frndly messge, take corrective actions(rollback) when runtym err occurs.
2) Syntax -------------------------------------------------------(1)  ►Try{ statements;} Catch(ExceptionClassName variable){statements;} Finally{statements}
3) Try block---------------------------------------------------- (1)  ►statemnts whch cn cause runtym err, statemnts whch dosnt requir execution whn runtym err occur
4) Catch block------------------------------------------------- (1)  ►statements whch should execute only whn thr is a runtym err occur, ►v cn put multple catch blocks for mltpl runtym err., ►first put catch 4 obvious errs then at last put one (Exception ex) for all kind of err.
5) Finally block------------------------------------------------(2)  ►compulsory execution., ►statements in finally block will execute irrespective of whether the tuntym err occur or not, usually used to cleanup the resources.
4. COMMON TYPES OF SYSTEM EXCEPTION
1) DivideByZeroException
1-Defnition------------------------------------------------ (1)  ►Occurs when attempting to divide a number by zero,
2-Handling DivideByZeroException----------------- (1)  ►try{int a = 10; int b = 0; int c = a/b;} catch(DivideByZeroException ex){cw([Link]);} //attempt to divide by zero
3-Best Practices------------------------------------------- (2)  ►precheck denomintr for zero using if, ►use single, double type as 10.0/0.0 doesn’t throw instead return infinity or NaN.
2) FormatException
1-Definition------------------------------------------------ (2)  ►frmt excp occur whn string cnt b cnvrtd in2 a numrc typ dur 2 invld formt(ltrs, symbl, spcs),►gnrl datatyp cnvrsn whr source formt is incomptbl ►conversion error
2-Handling FormatException------------------------- (1)  ►string s “123a”; try{int b = Convert.ToInt32(s);} catch(FormatException fe){cw([Link]);} // Input string was not in a correct format.
3-Best Practices------------------------------------------- (2)  ►use tryparse 4 saf cnvrsn, ►catch formt excption separately 4m othr excption.
3) IndexOutOfRangeException
1-Definition----------------------------------------------- (1)  ►occurs whn attempting 2 access array or iterable with invalid index no. like -ve index or index>= length of iterable.
2-Handling IndexOutOfRangeException----------- (1)  ►string[] fruits = { "Apple", "Banana", "Mango" };try{ [Link](fruits[3]); // Risky access } catch (IndexOutOfRangeException ex){ [Link]([Link]); } // Index was outside the bounds of the array
3-Best Practices------------------------------------------- (3)  ►Precchk index:if (index >= 0 && index < [Link]){ BankAccount selectedAccount = accounts[index];}, ►use foreach instead of for, ►combine with othr exception like format exception.
4) NullReferenceException
1- Definition------------------------------------------------ (2)  ►occurs whn attempting 2 access members of a cls obj (mthd, prop, indxr) through refvar that is null, passing uninitialized null object to methd, ►when null obj of any kind is used.
2- Handling NRE------------------------------------------(1)  ►string[] names = null; try{ [Link]([Link]); } catch (NullReferenceException ex){ [Link]("Error: Object is null!"/[Link]); }//
3- Best Practices------------------------------------------- (3)  ►validate be4 use using if (obj != null) else{throw new}, ►use ?. operator for safe access: obj?.membr;→retn null no exception, ►re throw, if want to notify to main method
5) ArgumentNullException
1- Definition ----------------------------------------------- (1)  ►whn v dnt wnt any mthd prmtr 2 recev a null val then v use if statemnt 2 vldat if prmtr val is null or not , if null thn v throw argmnt null excption, ►tho it is builtin cls but nt thrown by clr v hv 2 throw it manually
2- Example------------------------------------------------- (1)  ►void PrintUserName(string userName) { [Link]([Link]()); } PrintUserName(null) // ❌ Throws NullRefEx if userName is null
3- Handling In Method---------------------------------- (1)  ►void PrintUserName(string userName) { if (userName == null) throw new ArgumentNullException(nameof(userName)); [Link]([Link]()); }
4- Handling In Caller-------------------------------------(1)  ►try { PrintUserName(null); } catch (ArgumentNullException ex) { [Link]($"Error: {[Link]}"); } // Output: "Value cannot be null. Parameter name: userName"
6) ArgumentOutOfRangeException
1- Defintion ----------------------------------------------- (1)  ►Thrown when an argument's value falls outside the acceptable range for a method.
2- Example ------------------------------------------------ (1)  ►supos u promp usr 2 entr numbr betwn 1-10 for mthd tht chks numbr btween 1-10
3- Handling In Method---------------------------------- (1)  ►static void CheckNumber(int num) { if (num < 1 || num > 10) throw new ArgumentOutOfRangeException(); }
4- Handling In Caller------------------------------------ (1)  ►static void Main() { try { CheckNumber(15); // Try changing this number } catch (ArgumentOutOfRangeException ex) {CW([Link]); CW([Link]); CW([Link]);} }

4- APPLICATION EXCEPTION HANDLING


1) Definition ---------------------------------------------------(1)  ►programmer defined exception not thrown by the clr but the programmer, ex: two number division we want dinominator should not be an odd number. So create a application exception
2) Creating Instance Of ApplicationException -------- (1)  ►ApplicationException nameOfException = new ApplicationException(“err msg:”), throw nameOfException; OR throw new ApplicationException( “err msg:”);
3) Creating Own Exception Class------------------------- (1)  ►public class DivideByOddNumber : ApplicationException {public override string Message { get{ return “attempting to divide by odd number”;} } }
Definition------------------------------------------------ () 
Syntax Of Multi Dimensional Array-------------- () 
Accessing Elements Of MD Arrays---------------- () 

Definition--------------------------------------------------- (1) 
Syntax------------------------------------------------------- (1) 
Rules--------------------------------------------------------- (3) 
Working----------------------------------------------------- (1) 
Used When------------------------------------------------- (1) 
Types-------------------------------------------------------- (1) 
Special Points---------------------------------------------- (1) 

DEFINITION------------------------------------------------- () 
SYNTAX------------------------------------------------------- () 
ACCESSING ELEMENTS-------------------------------- () 
TYPES---------------------------------------------------------- () 








Implicit Tuple With Named Fields-------------------- (1) 

You might also like