Latest posts on "c-net"

How to jump out of foreach with break statement in C#?

7 March 2016

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.

How to use foreach with the continue?

7 March 2016

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.

How to perform basic foreach loop?

7 March 2016

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.

How to Download a Files from web?

7 March 2016

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.

How to get ip address or host name using c# .net?

7 March 2016

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.

[solved]To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application.

4 March 2016

If you want to see exact error of the page you must turn Off custom error mode. After changing the webconfig file save and reload the page you can view the exact error of the page. This setting is under .

How to reverse a string in c# without using built in function?

2 March 2016

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.

How to reverse a string in c# ?

2 March 2016

In this article we try to implement reverse string. String is converted to char array using ToCharArray method after that reverse operation will happen.

How to convert String array to List using C#?

2 March 2016

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+.