|
Hello...
I have a problem. For example :
public class MyClass
{
public int A = 1;
public int B = 2;
public int C = 3;
}
If I serialize that class, I want to serialize A and B only. I don't want to serialize C.
Are there any possibilities to do that ?
I'm using XmlSerializer.
Thanks...
|
|
|
|
|
Use the XmlIgnore attribute to prevent specific public properties from being serialized.
/ravi
|
|
|
|
|
Ravi's response will take care of your problem, but if you want further information I have an article on XmlSerializer attributes[^] that should help out.
|
|
|
|
|
hi
my project have 2 form and i call show() method to showing Form2
i want to pass a parameter (or property) to form2 when it showing or
find that form2 is close or show in form1
Does anyone know how i can do this action?
Thanks;
|
|
|
|
|
I think I understand your question, try using ShowDialog() instead of Show() . If I don't understand your question, reply with more details.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Declare private fields for the properties in Form2 and set them when you construct the form. For example:
Form2 f2 = new Form2 (prop1, prop2, etc.)
f2.Show(); /ravi
|
|
|
|
|
hi
my project have 2 forms ...in form 1 i have a button and button1_Click is
private void button1_Click(object sender, EventArgs e)
{
this.DesktopLocation = new Point(DesktopLocation.X - 200, DesktopLocation.Y);
new Form2(this.DesktopLocation.X + this.Width, this.DesktopLocation.Y).Show();
}
now form2 is Show() and i want to know IN FORM1 that form2 is close or still running ....
and when form2 is close event or property fire in form1 to Form1.DesktopLocation return to orginl location...
here is source code of my project[]
Does anyone know how i can do this action?
Thanks;
|
|
|
|
|
Hi
Declare in form1
public static bool IsForm2Closed;
now in form2 add at closing event this line
form1.IsForm2Closed = true;
thus , you can query about the var IsForm2Closed from form1 Timer , button or such
bye
I know nothing , I know nothing
|
|
|
|
|
Dear All,
I tried searching CP for some relevant answer as to "How to integrate a help (.chm) file with my dot.net application).
Any comments / suggestion / solutions ...
Thank you!
Nauman
"Mess with the Best, Die like the rest"
|
|
|
|
|
On install of your software put it into the same directory as the your executeable. Or not, doesn't matter, just know where you put it. Build a string for the directory of the file, and show it like this:
<br />
Help.ShowHelp(this, strHelpFilePath, "Introduction.htm");
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Thx for the hlep Perez.
I m quite unable to understand the syntax above, can you please be more elaborative.
Thank you!
"Mess with the Best, Die like the rest"
|
|
|
|
|
Hi,
I have 2 tables with same fields like event, venue, date and cost. Table 1 has 5 records and Table 2 has 100 records. How can i take a record from Table 1 and match with Table 2 to get the exact match record of Table 1 record. Please help me out. Thanks in advance.
|
|
|
|
|
If I understand you correctly, you just have to make a condition that matches all the fields. Example:
... where t1.event = t2.event and t1.venue = t2.venue and t1.date = t2.date and t1.cost = t2.cost
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks for the reply. all the Records in Table 1 and Table 2 will not be same. I will give you an example.
Table 1:
Event Venue Date Cost
Cricket Chepauk Stadium 11-10-2007 99
Table 2:
Cricket Match Chepauk, Madras 11-10-2007 99
India Vs Aus Chepauk Stadium 11-10-2007 99
Cricket Match Madras Satdium 11-10-2007 99
Here 1 record of Table2 will be exact match because 1 word from all the fields has matched. I need the nearest match from Table 2 for Table 1 record.
Thanks in advance
Jebin
|
|
|
|
|
jebin k wrote: all the Records in Table 1 and Table 2 will not be same.
That's a funny definition of "exact match".
jebin k wrote: I need the nearest match from Table 2 for Table 1 record.
You can count how many of the fields that match with something like:
case when t1.Event=t2.Event then 1 else 0 end +<br />
case when t1.Venue=t2.Venue then 1 else 0 end +<br />
case when t1.Date=t2.Date then 1 else 0 end +<br />
case when t1.Cost=t2.Cost then 1 else 0 end
You can sort on the value using descending order to get the best matches first, and filter out only the matches that reaches a certain value.
You can use other values than 1 in each case if you want the fields to have different importance.
---
single minded; short sighted; long gone;
|
|
|
|
|
Sorry for the wrong word (Exact match) , Thanks for your advice.
|
|
|
|
|
What you could do is take the row from table one, load it into some variables,
Once you have your fields loaded up, you would iterate through table 2, and if the first column matches, look at the second column, and contiue for all columns, if one of them doesn't match, then break out out of the loop, and continue to the next row.
Once you find a row that has all columns matching, break out of the loop and return success.
Hope that helps
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Field values will not be exactly same, 2 fields date and cost will be same but other two string columns will not be exactly same .
(Eg Dallas Cowboys vs Chicago bulls will be there in Table 1 Event Column where as Cowboys Vs Chicago bulls will be in Table2 Event Column and other columns will be same..
|
|
|
|
|
As you've been told, the general idea is to take your "search" record in table 1 and itterate through your "List" records in table 2 to look fgor a match. The fact that it is not an exact match is irrelevant. You must decide your algorythm for determining a match and use that within the itteration. The general process is the same!
|
|
|
|
|
how can i create inventory system with database??
plss help me..
|
|
|
|
|
That's a big vague. Start by defining what you want this inventory system to do.
|
|
|
|
|
Hi, I'm new to asp.net and C# and am having problems understanding how to create custom events. I have looked at various sites and the most basic examples that I have been able to find are far too complicated for novices.
The tutorials that I have found all seem to suggest that, to create custom events, I need to write delegates and event handlers to start with but they are unclear and not specific.
Also, some of the code I have downloaded is dated and does not work with VS2005 and what happened to starting with the basics?! I.e. right from scratch.
Does anyone know any sites/links that might be useful to me.
Specifically, I want to be able to have to separate controls (ascx) linked to a parent control. Where one of the child contols contains a textBox and a button to submit text which will make the said text appear in the label of the other child control.
Any help truly appreciated,
Dave
|
|
|
|
|
Here's quite a good article on the subject (skip down to the step-by-step bit)
http://www.ondotnet.com/pub/a/dotnet/2002/04/15/events.html[^]
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
Hi all,
I have Visio 2007 installed in my system. I would like to know how I can proceed in generating skeletal code from my Class diagrams designed in Visio.
Even I tried to do reverse engineering using Visio tool bar available in Visual studio 2005. But it resulted in blank Visio project.
Thanks in advance,
Regards,
Krishnaraj
|
|
|
|
|
Hello!
When using a virtual listview, is it possible get new items added to the top of the listview instead of the bottom?
|
|
|
|