You'll have to use the debugger to be sure, but at a guess the request.GetResponse is not returning.
It's a blocking call, so if the response doesn't complete properly, then it'll never return: HttpWebRequest.GetResponse Method (System.Net)[^] "This method blocks waiting for content to post; if there is no time-out set and you do not provide content, the calling thread blocks indefinitely."
Since what you are trying to do is probably illegal in your country (or FarceBook wouldn't be filtered) you probably need to think long and hard before looking at alternative approaches such as proxies.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
I want to display alert in system tray using c#.
Message is shown in popup window (like form) ,fetched from database
it will be displayed for 10 seconds
If user forget to see ,it will be displayed as icon in the system tray
and clicking can be opened to see the popup window.
First of all, we're volunteers, and yours is as urgent as every other post. Second, it looks like a set of requirements, a rough description of what the app should do. We can help if you are stuck in building it and have specific questions, but it is not a place to order free code
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
i want to create my on language translator in C# this is my university project i do not know how to start how to implement statistical machine translation algorithm in c#. can you please guide me and give me helping material to complete this task
Then I'm afraid that you have probably taken on a much bigger project than you can manage. As others have said here, you're better off looking for a project that is more to your skill level. When you do a final project, you show off the skills that you have learnt; it's never meant to be about taking on something you have no idea about.
So im practicing some C# basic concepts and was writing some code to simply calculate the income of a person after asking them to input their name, PayRate and Income and then displaying the income of that same person before and after taxes. However, after the user inputs their hours-per-week the program seems to jump past asking for their PayRate and displays their weekly income before and after taxes, so if someone could point out what i did wrong itd help me out, Thanks! Also the Console.ReadLine() and the console.Read() at the end of the program is to simply keep the command window open so i can check my work since it seems to want to close immediately after the code has been run instead of allowing me a chance to analyze the output so if someone could help me with that too it would be greatly appreciated thanks again.
static double CalcWeeklyIncome(double hours, double PayRate)
Console.Read returns the character code[^] of the next character from the input. For example, if the user types 3, it will return the number 51, because that is the ASCII code for the number 3.
If the user types 37, then your code will set hours to 51(the ASCII code for 3), and PayRate to 55(the ASCII code for 7). When you reach the second call to Console.Read, there is already a character in the buffer, so it doesn't need to wait for the user.
This is obviously not what you want. Instead, you should use Console.ReadLine to read the entire input until the user presses the Enter key.
Console.WriteLine("Please input your hours-per-week: ");
input = Console.ReadLine();
while (!double.TryParse(input, out hours))
Console.WriteLine("Please enter a valid number: ");
input = Console.ReadLine();
You'll then need to repeat that for the hourly rate.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Thanks so much guys I used the Convert.ToDouble method to keep the cents part of the value after taxes, I really appreciate the help, I would never have thought of that to be honest and learned a few new concepts thanks to your responses. Thanks Again!
Last Visit: 31-Dec-99 18:00 Last Update: 1-Oct-23 1:53