| Quick Search |
This is the implementation of “System.Net.Sockets”. In this example we will learn how to use the “TCPListener” and “TCPClient” classes from the “System.Net.Sockets” namespace.
This example consists of two files. The “DateServer” class which uses the “TCPListener” class to accept requests from new clients. Once the client is connected with … Read More
When moving your pages from one place to another it is very tempting to handle old inlinks by creating a simple Response.Redirect( sNewPage, true );
This sure will work, but this type of redirect is a 302 and is meant for temporary relocations of pages. But your pages are permanently moved … Read More
Good for preparation and general self-testing, but too specific for the actual job interview. This was sent in by a job applicant getting ready to step into the .NET field in India.
Are private class-level variables inherited? – Yes, but they are not accessible, so looking at it you can honestly … Read More
What is Serialization in .NET?
Anwer1
The serialization is the process of converting the objects into stream of bytes.
they or used for transport the objects(via remoting) and persist objects(via files and databases)
Answer2
When developing smaller applications that do not have a database (or other formal storage mechanism) or data that doesn’t need … Read More
I am constantly writing the drawing procedures with System.Drawing.Graphics, but having to use the try and dispose blocks is too time-consuming with Graphics objects. Can I automate this?
Yes, the code
System.Drawing.Graphics canvas = new System.Drawing.Graphics();
try
{
//some code
}
finally
canvas.Dispose();
is functionally equivalent to
using (System.Drawing.Graphics canvas = new System.Drawing.Graphics())
{
//some code
} //canvas.Dispose() gets called automatically
How do … Read More