Search Results

Search found 2 results on 1 pages for 'sean87'.

Page 1/1 | 1 

  • Converting my PC to a server

    - by Sean87
    I live in a university campus and luckly I have super fast internet in my room, with a static IP address. I tried to setup XAMPP and by pointing to my IP address from anywhere I can access the services running on my PC. Now I am thinking of hosting my own website on my own PC. I am not sure what else I will need (beside the static IP) to make this happen (if it is possible at all). I am running Windows 7 ultimate and of course I do have a domain registered. What should I point my domains DNS names to make this happen (I assume it is far more steps involved!)

    Read the article

  • Using array of Action() in a lambda expression

    - by Sean87
    I want to do some performance measurement for a method that does some work with int arrays, so I wrote the following class: public class TimeKeeper { public TimeSpan Measure(Action[] actions) { var watch = new Stopwatch(); watch.Start(); foreach (var action in actions) { action(); } return watch.Elapsed; } } But I can not call the Measure mehotd for the example below: var elpased = new TimeKeeper(); elpased.Measure( () => new Action[] { FillArray(ref a, "a", 10000), FillArray(ref a, "a", 10000), FillArray(ref a, "a", 10000) }); I get the following errors: Cannot convert lambda expression to type 'System.Action[]' because it is not a delegate type Cannot implicitly convert type 'void' to 'System.Action' Cannot implicitly convert type 'void' to 'System.Action' Cannot implicitly convert type 'void' to 'System.Action' Here is the method that works with arrays: private void FillArray(ref int[] array, string name, int count) { array = new int[count]; for (int i = 0; i < array.Length; i++) { array[i] = i; } Console.WriteLine("Array {0} is now filled up with {1} values", name, count); } What I am doing wrong?

    Read the article

1