EVENT DRIVEN - PREFI REVIEWER (copy)

0.0(0)
studied byStudied by 21 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/52

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

53 Terms

1
New cards

Streams

represents a source that provides a sequence of bytes, such as a file, an input/output (I/O) device, an interprocess communication pipe, or a TCP/IP socket.

2
New cards

Output streams

It refers to a printer, remote server location, or a printer where the data is written.

3
New cards

Input streams

It refers to a file or any source where the data can be read and assigned to the memory variables in the program.

4
New cards

System.IO

namespace contains classes that allow to write and read files.

5
New cards

FileStream

It is a class that is used to create a byte-oriented stream attached to a file.

6
New cards

mode

The ____ parameter specifies how the file needs to be opened.

7
New cards

FileMode.Create

It creates a new output file, which will be overwritten if a file already exists.

8
New cards

FileMode.CreateNew

It creates a new output file that is not existing.

9
New cards

FileMode.Open

It opens an existing file.

10
New cards

FileMode.OpenOrCreate

It opens an existing. If not, it creates a new one.

11
New cards

FileMode.Truncate

It opens an existing file and truncates the content that already exists.

12
New cards

ReadByte()

This method reads a single byte from a file and returns as an integer value.

13
New cards

Read()

This method reads the specified number of bytes from a file into an array.

14
New cards

WriteByte()

It writes the specified byte into the file.

15
New cards

Write()

It writes an array of bytes into the file.

16
New cards

Flush()

This method instantly writes the data into the file.

17
New cards

void Close()

This method closes the file, releasing the system resources that are allocated to it.

18
New cards

file pointer

it determines the location of the next read/write operation to take place on the file.

19
New cards

Seek

It is the method used to relocate the file pointer in the file.

20
New cards

Seek()

is a method that allows setting the file position indicator of file pointer to the preferred location in the file.

syntax: long Seek(long n, SeekOrigin location)

21
New cards

bool CanRead

It returns true if the stream can be read.

22
New cards

bool CanSeek

It returns true if the stream supports position requests.

23
New cards

bool CanTimeout

It returns true if the stream can time out.

24
New cards

bool CanWrite

It returns true if the stream can be written.

25
New cards

long length

It contains the size of the stream.

26
New cards

int ReadTimeout

It indicates the time before a timeout occurs for read operations.

27
New cards

int WriteTimeout

It indicates the time before a timeout occurs for write operations.

28
New cards

StreamWriter

writes characters to a stream and contains several constructors

29
New cards

SteamWriter(Stream stream)

It is used to create a character-based output stream.

30
New cards

StreamWriter(string fileName)

It is used to open a file directly.

31
New cards

Close()

It closes the file.

32
New cards

Flush()

It instantly saves the file content from buffer to memory

33
New cards

Write()

Using a File stream class, this writes into the specified file.

34
New cards

WriteLine()

Line by line, it writes into a file.

35
New cards

StreamReader

is a class that reads characters from a byte stream.

36
New cards

StreamReader(Stream stream)

It is the name of an open stream such I/O devices or a file.

37
New cards

StreamReader(string fileName)

It specifies the name of the file to open.

38
New cards

Flush()

From buffer to memory, it instantly saves the file content.

39
New cards

Close()

It closes the file and is mandatory to this class.

40
New cards

Read()

From the file stream, it reads the content.

41
New cards

ReadLine()

From the given file stream, it reads the content line by line.

42
New cards

ReadToEnd()

From the current location until the end of the stream, it reads all characters.

43
New cards

Peek()

It returns the value in the stream without moving the file pointer.

44
New cards

Seek()

Sets the file pointer at the desired position in a file.

45
New cards

Assemblies

are files that contain compiled code targeted at the .NET Framework. These are basically physical packages meant for distributing code.

46
New cards

Metadata and Manifest

What are the 2 sections of assembly?

47
New cards

Metadata

It includes information about the data types of the program that are being used.

48
New cards

Manifest

It holds the information of the assembly, which consists of the name, version number, and the type of mapping information.

49
New cards

.exe and .dll

What are the 2 file extensions of assembly?

50
New cards

.exe

for standalone applications

51
New cards

.dll

for reusable components.

52
New cards

Private Assembly

  • Simplest type of assembly

  • Can only be used within a software package that is intended to be used.

  • private assemblies with the same class name are not a problem since the application can only see the classes that are mentioned in its private assemblies

  • Does not require registry entries

53
New cards

Shared Assemblies

These are libraries that other applications can commonly use.