DCSIMG
C# - YsA.Net

Browse by Tags

All Tags » C# (RSS)
Consider the following problem: We have a web app which can send messages between the users that are connected to it. A user can send a message to any number of users. The implementation is simple: When a user sends a message: The message is saved in the database Cache value is inserted for each recipient. The saved value is a time stamp which indicates when the user last received a message. Users that are suppose to see the message: The client is polling the server and asks if the server has new...
This week my team upgraded our solutions to Visual Studio 2010 and .Net framework 4. When we ran the tests of one our projects, one of our tests failed with a weird reason. The code is simple:   1: public DateTime CreateDateWithGivenTime( string time) 2: { 3: var t = TimeSpan.Parse(time); 4: ... 5: } The test was: 1: [Test] 2: [ExpectedException( typeof (OverflowException))] 3: public void CreateDateWithGivenTime_HoursNotInRange_ThrowOverflowException() 4: { 5: CreateDateWithGivenTime( "77...
In our latest project we encountered a problem with the usage of a Web Service. The web method we created received an object as a parameter that contained information about the operation we wanted to perform. When I created the web reference to the service a strange thing has happened : Visual Studio created a proxy class for the web service and another proxy class for the type of the object that the web method received. It even became more complicated when the object contained an enum : VS created...