The following example describes how to perform foreach statement implemented using while statement. First the IEnumerablecollection is asked to create new enumerator instance (which implements IEnumerator). Then it calls IEnumerator.MoveNext() method until it returns false.
The following example shows how to break out of a foreach statement in c#. If break statement is used within the loop body, it stops the loop iterations and goes immediately after the loop body.
This articles describes how to use foreach with the continue. If continue statement is used within the loop body, it immediately goes to the next iteration skipping the remaining code of the current iteration.
This example describes how to perform foreach statement. The foreach statement iterates through a collection that implements the IEnumerable interface. When we compare with for statement foreach does’t use the indexes.
To download a file without blocking the main thread to use asynchronous method DownloadFileAsync.The DownloadFile method downloads to a local file data from the URI specified by in the address parameter. This method blocks while downloading the resource. To download a resource and continue executing while waiting for the server's response, use one of the DownloadFileAsync methods.
In general, we are getting IP address by run command by type keyword ipconfig . And, if we execute this as Administrator Command Prompt then you will get the basic Network details like Host Name, IP Address and Gateway.
In this article I am going to reverse string without using build in function. Here reverse string achieved without using ToCharArray. First of all calculating the string length after loops the calculated string length and logic implemented.
In this article we try to implement reverse string. String is converted to char array using ToCharArray method after that reverse operation will happen.
In this article I will explain how to convert String array to List using C#. we can achieve by using .ToList() on array types, this seems to be available only in .Net 3.5+.
When you try to send an email from web application if you got exceptions like this your Username or password must be wrong and also Check port is 465 (SSL) change to 80.