Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Shashwat Rohilla

Member Since 13 Jan 2008
Offline Last Active Oct 20 2013 08:06 AM

Topics I've Started

How to restart a Thread in C# .Net 4.0?

06 March 2012 - 04:37 AM

I'm using C# .Net4.0 in VS 2010.
How do I restart a Thread?
Its like I want to Abort() the thread and Start() it from the beginning again?
Is it possible?

How to restart a Thread in C# .Net 4.0?

06 March 2012 - 04:22 AM

I'm using C# .Net4.0 in VS 2010.
How do I restart a Thread?
Its like I want to Abort() the thread and Start() it from the beginning again?
Is it possible?

How to know whether I'm connected to a network or not?

06 March 2012 - 03:45 AM

I'm using .Net 4.0 in VS 2010.
I can retreive the IP Address of my machine as

string hostname = Dns.getHostName();
IPHostEntry host = Dns.getHostEntry(hostname);

Now host.AddressList is an array of IPAddresses.

I noticed that AddressList[0] contains nothing, AddressList[1] the loopback address. I'm not sure about other indices.

If I have created a server on one machine and it wants to populate its IP to client (may be the machine only), then which IP (among host.AddressList) shall I populate? Which index to use?
How do I know whether I'm connected to a LAN or the internet, or not connected at all?
Please clarify.

How to use .Net (C#) classes to generate XML strings?

28 February 2012 - 10:37 AM

C#

I want to send an XML string over network and then parse it using predefined XML classes.
I tried XmlTextWriter, but it asks to a Stream object to initialize.
I can have Console.Out there as

XmlTextWriter textwriter = new XmlTextWriter(Console.Out);
then I can use
textwriter.WriteStartDocument()
textwriter.WriteEndDocument()
textwriter.WriteStartElement()
textwriter.WriteEndElement()

methods.

But still I didn't find any way to convert it to string or byte[] to send it to socket.
Also I didn't find any way to parse the XML data using these classes.
Please help!

Setting the Viewport for rendering

20 February 2012 - 12:57 PM

I'm using XNA 4.0 in VS 2010

Please tell me how to set a particular part of the screen for rendering.
eg I want to use 70% of the screen for 3D rendering (left side) and rest 30% (right side) for displaying the scores and other information.

I tried to use change some variables but they were all read-only.
Thanks

PARTNERS