No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
hi , i am trying to write code to remove specific word from the text entered by the user do do { Console.WriteLine("enter your text"); input = Console.ReadLine(); text = input.ToLower(); result = text.Replace("remove", ""); Console.WriteLine("Edited text:" +result); } while(text == null); { Console.WriteLine("enter your text"); input = Console.ReadLine(); text … |
|
Hello, in my program i want to read data from text file and display the data as keyvalue pair using console application. i am using below code to read the data [code]{ string[] lines = System.IO.File.ReadAllLines(@"C:\Users\ramy\desktop\grocery billing.txt"); System.Console.WriteLine("Contents of grocery billing.txt :"); foreach (string line in lines) { Console.WriteLine(line); // … |
|
HI, i am writing a program to enter monthly grocery items, purchase date and price. as part of program i have written to enter the data, write the entered data to a text file and read the existing data from the text file. [CODE]using System; using System.IO; using System.Collections.Generic; using … |
|
Hello, below is the program written to enter the details of grocery products purchased and find the totalamount. namespace grocery_billing { public class program { public static void Main() { int choice, key; float Price, TotalCost; string ItemDescription; DateTime Date; File.Create(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "grocery billing.txt"); Console.WriteLine("Press 1 to read data from … |
|
hello, Below is the program written to enter item description, price and date of purchase. finally it is going to give the total amount. here i wanted to write the output of this program to a file created and saved on the desktop .To create a file, i have used … |