|
Ok, the easiest way is to create a library assembly:
1) Add a new project in your solution of type "Class Library"
2) Put your code for any classes that are shared ( like BuddyList ) into this project.
3) Right-click on the References node of both your server and client and add a reference to the new project.
Both your server and client will now be using the exact same classes and you will be able to serialize them in one and deserialize them in the other.
Nick
|
|
|
|
|
Thank you very much! I did what you said,and now it working perfectly.thanks!
|
|
|
|
|
I have created setup of my .net window application. If I am installing same setup in other PCs, first time software is running fine. but if I closed software and again try to open , again installing of setup is started. as
Please wait while while windows configuring XXXXX
any solution for this?
|
|
|
|
|
I am using the property grid and have it doing most things in need. the property grid is loaded with custom class and i have used ExpandableObjectConverter to display subproperties. I would like to know if there is a way to hide one or more of these subproperties at runtime.
In the below link they are doing this with the standard font class. is there a way to do the same with a custom class instead of the font class.
http://www.eggheadcafe.com/forumpost.aspx?redirect=forumpostsubmission&topicid=2&forumpostid=10158840#Post10158840[^]
an example of my custom class is below:
public class CustomClass
{
CustomClassSubProperty m_ccsp = new CustomClassSubProperty();
public CustomClassSubProperty M_ccsp
{
get { return m_ccsp ; }
set { m_ccsp = value; }
}
}
public class CustomClassSubProperty
{
string m_s = "Hide Me";
public string S
{
get { return m_s; }
set { m_s = value; }
}
string m_a = "Show Me";
public string A
{
get { return m_a; }
set { m_a = value; }
}
}
Is there a way I can hide the sub property S in the property grid at runtime? Thanks for the help.
|
|
|
|
|
Yes - Hiding inherited properties[^] works the same for your own ones.
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
yeah I can do that but is there anyway i can hide it at runtime. so i can show it if a certain condition and hide not.
|
|
|
|
|
I had once configured my nokia (supporting AT commands), thus, each incomming SMS appeared on my hyperterminal immediately. So it was forwarded automatically from the phone.
But I heave forgot how to configure the phone via AT commands to achieve that. How to do it?
SPIRANCA
|
|
|
|
|
I need to get machine hardware information - what i need to know is the machine memory, computer name, system type ( 32 bit / 64bit ) hard disk size and so on ...
Thanks.
|
|
|
|
|
Yanshof wrote: I need to get machine hardware information
One possibility is WMI[^], but a lot could also be achieved my simply importing the My namespace into the C# project.
Good luck
Current status: looking for a new (paid) challenge
|
|
|
|
|
what do you mean by "importing the My namespace..." ?
Can you please explain.
Thanks.
|
|
|
|
|
The functionality can partially be provided by importing one of the .NET Framework libraries that were originally developed with use for VB.NET - the My namespace contains some fun goodies.
The procedure of adding the reference can be found here[^], also explaining shortly what one can do with it.
I are Troll
|
|
|
|
|
|
hi! i want to give product key requirement feature in desktop application if possible in setup, is there any way this thing is avail in .net or do i have to do some coding in program , please if possible give tutorials.
|
|
|
|
|
it depends how you would like to do it ,
Have a hash of a users hardware id , have it just a random code with "-" in it , have it check online etc
Jed
|
|
|
|
|
i grabbed the idea but a link example will be more helpful meanwhile i will going to try it.
|
|
|
|
|
Webbrowser control doesn't work when opening page "http://photos.weirwindle.org[^]". The problem is: after page is opened, user can click 'start', 'next' or 'previous' only once, after one click, these buttons are disabled!!!
I guess there is something wrong with browser configuration, but both internet explorer and firefox can open this page correctly. I can't figured out this problem for a long while...
I pasted some code on my test application, one textbox, one button and one webbrowser:
private void Form1_Load(object sender, EventArgs e)
{
string url = "http://photos.weirwindle.org";
txtAddress.Text = url;
//webBrowser1.Navigate(url);
}
private void btnGo_Click(object sender, EventArgs e)
{
webBrowser1.Navigate(txtAddress.Text);
}
|
|
|
|
|
Not sure, but maybe this can help you.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
How do you generate two random numbers at the same time and then multiply, divide, add or subtract those numbers together?
Random randomNumber = new Random();
int number = randomNumber.Next(1, 12);
lblRandom.Text = Convert.ToString(number);
That is the code i used to generate the numbers.
|
|
|
|
|
so what do you want?
EASY COME EASY GO
|
|
|
|
|
|
do not tell me you want this:
<br />
Random randomNumber = new Random();<br />
int number1 = randomNumber.Next(1, 12);<br />
int number2 = randomNumber.Next(1, 12);<br />
int x=number1*number2;<br />
EASY COME EASY GO
|
|
|
|
|
Do not tell me you just did his homework for him...
|
|
|
|
|
Do not tell me that his homework was that simple!
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
If it's that simple, it usually is homework.
|
|
|
|
|
Dave Kreskowiak wrote: If it's that simple, it usually is homework.
I wish mine had been! I might have handed it in more often...
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|