I've been a Delphi developer for several years but am trying to learn .NET and C# but I have a few questions...
1) Does C# / .NET have timers I'd like to setup a timer so that a function is called every XX minutes.
2) How can I split a string containing linebreaks into an array (or any other object) For example let's say I have "Hello<CR>To the world!<CR>" then I'd like a[0] = "Hello" and a[1] = "To the world!"
3) Does C# / .NET have any simple built-in HTTP servers I'd like my application to have a built-in webserver for remote configuration (sort of like a router configuration web server)
Thanks for any help!

Beginning C# / .NET Questions ( Timers, Strings, and HTTP servers)
jimcjr
For your first question
Yes .Net have a timer control and component
take a alook at
http://msdn2.microsoft.com/en-us/library/system.threading.timer.aspx
http://msdn2.microsoft.com/en-us/library/system.threading.timercallback.aspx
http://www.c-sharpcorner.com/controls/timer.asp
http://msdn.microsoft.com/msdnmag/issues/04/02/TimersinNET/
For seconed question
http://msdn2.microsoft.com/en-us/library/system.string.split.aspx
For Third question
Yes .Net have http server called httplistner
http://msdn2.microsoft.com/en-us/library/system.net.httplistener.aspx
jchau
hi shakalama
.Net 2 already come with built in Http Server called HttpListner
JoeD
Yes, you'll find timers in System.Timers, System.Threading and System.Windows.Forms. The appropriate class depends on your usage. I.e. the one in System.Windows.Forms is optimized for usage in Windows Form apps.
Yes, you can use the string.Split() method for this purpose.
there's no webserver in the .NET Framework classes used in C#. There is .NET Remoting that you can use for this purpose. Alternatively, you can take the sourcecode of Cassini. This is the basis for the built-in web server used in Visual Studio Web Developer, part of Visual Studio 2005.
elixic
Ah, yes, I forgot about that one.
Gafrage
hi,
1) yes there are timers, in tools you will find it , add it to the form , go to properties then enable it , and set the intervals, i don't remember but by code you can make something like this, its a form has a lable to be used as digital watch
public partial class Form1 : Form {
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Timer myTimer = new Timer();
myTimer.Interval = 1000;
myTimer.Enabled = true;
myTimer.Start();
myTimer.Tick += new EventHandler(myTimer_Tick);
}
void myTimer_Tick(object sender, EventArgs e)
{
this.label1.Text = DateTime.Now.ToLongTimeString();
}
}
2) yes you can use string.split method
string hello = "Hello\rTo the world!\r ";
string[] parts = hello.Split('\r');
3) i don't know if there is something like this but i don't think so , System.net namespace has lots of classes that may help you to build your own server App,
search this forum for remote or remoting you will find lots of examples or you may consider to ask about it in this forum http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=40&SiteID=1
hope this helps
Jeff-B
hi,
thx you i didn't know that, actualy i use sockets to build my networking applications, so that i don't have any idea about this server, but i'll take a look at it soon
many thx
Zatoichi
Aubrey Kagan
no problem this things happend to all of us