Code for Reading and writing from a file in c#?
Answer / sabina
StreamWriter and StreamReader can be used to read and write
unicode chars to a file.
TextWriter adn TextReader are abstract base class from
which SW and SR inherits.
Stream is an abstract base class supports reading and
writing bytes into a file(arrays -> file) (file -> arrays)
FileStream exposes the stream ard the file
BinaryStream is used to write and read primitive
datatypes/encoded strings to files.
to encode string to bytes
byte[] b = new UTF8Encoding(true).GetBytes(string);
to decode string from bytes
String str = new UTF8Encodeing(true).GetString(b);
| Is This Answer Correct ? | 0 Yes | 0 No |
How to pass multiple rows from one gridview to another gridview after clicking the checkbox.
. Write a program to print the following outputs using for loops $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
Can you declare an array of mixed Types?
Create a class called Accounts which has data members like ACCOUNT no, Customer name, Account type, Transaction type (d/w), amount, balance D->Deposit W->Withdrawal If transaction type is deposit call the credit(int amount) and update balance in this method. If transaction type is withdraw call debit(int amt) and update balance. Pass the other information like Account no,name,Account Type through constructor. Call the show data method to display the values.
program to check if a number is "perfect number".
Write a program to convert postfix expression to infix expression.
working with arrays
program for addition of fraction(M/N + P/Q = Y/Z)
how can i split sting in textbox in windows application using c# .net
IS Array list is generic or non generic
program to reverse the order of words in a string.
Write a program to input an integer and - display the reverse - display the sum of each digit - should include logic that considers the input number as any number of digits long