[Solved] Replacing a word in a txt using c# in visual studios

the complete version private void button1_Click (object sender, EventArgs e) System.IO.StreamReader sr = new System.IO.StreamReader(openFileDialog1.FileName); private void button2_Click (object sender, EventArgs e) String find textbox1.Text string replace = “dog”; File.writeAllText(openFileDialog1.FileName,File.ReadAllText(openFileDialog1.FileName).Replace(find, replace)); also need to add a textbox solved Replacing a word in a txt using c# in visual studios

[Solved] C# in Visual Studio [closed]

You may start with the largest number first, something like: foreach(number in positiveNumberArray) { if (number > 50) Console.WriteLine(“Out of Range”); else if(number > 40) Console.WriteLine(“Range 40-50”); else if(number > 30) Console.WriteLine(“Range 30-40”); else if(number > 20) Console.WriteLine(“Range 20-30”); else if(number > 10) Console.WriteLine(“Range 10-20”); else Console.WriteLine(“Range 0-10”); } Edit: To count the up the … Read more

[Solved] Simple Client Manager Soft – C# with Visual Studio or Java with Eclipse? [closed]

This is perhaps not the best question to ask on SO as it’s bound to get opinions rather than answers, with this in mind, I will give you my opinionated answer. As your first real life application, it’s probably best you go with something you’re somewhat familiar with, either that or find a solution with … Read more

[Solved] Unterminating c++ Program [closed]

You are calling the MathContext constructor-methods directly, change that to to the below by dropping the first part of MathContext::MathContext to just MathContext int main(int argc, _TCHAR* argv[]) { MathContext context[8]; context[0] = MathContext(); context[1] = MathContext((unsigned short) 46); context[2] = MathContext((unsigned int) 20); context[3] = MathContext(MathContext::UP); context[4] = MathContext((unsigned short) 36, (unsigned int) 30); … Read more

[Solved] How to make a professional Log in page such as “Tumblr” in Vs 2012 C# [closed]

Why don’t you mess with some HTML and CSS until you get something similar to what you want? We can help you with the hidden details and bugs, but we are not your personal web developers… Take a look at these websites with some tutorials on how to do such things: http://tympanus.net/codrops/2012/10/16/custom-login-form-styling/ http://www.freshdesignweb.com/css-login-form-templates.html From there … Read more

[Solved] Define sign ambiguous pointer parameter for a function

With C, you have limited options. You can do the typecasting that you don’t like when you call the function: void MyFunction(unsigned char* Var); int main(void) { unsigned char Var1 = 5U; signed char Var2 = 5; MyFunction(&Var1); MyFunction((unsigned char *)&Var2); } you can use void * and typecast in the function itself and just … Read more