|
You don't need a common arraylist to serialize several arraylists into one file. Just make several calls to formatter.Serialize passing the same stream:
formatter.Serialize(myStream, arr1)
formatter.Serialize(myStream, arr2)
formatter.Serialize(myStream, arr3)
To restore the arraylists, make the calls to formatter.Deserialize in the exact same order:
arr1 = (ArrayList) formatter.Deserialize(myStream);
arr2 = (ArrayList) formatter.Deserialize(myStream);
arr3 = (ArrayList) formatter.Deserialize(myStream);
|
|
|
|
|
hi there,
Thanks for the reply. Your solution works perfectly for binary serialization. However, i was wondering, does this concept works the same if i want to use XML serialization?
Thanks.
|
|
|
|
|
Hi i am developing a windows application in C# (in 2003).
My form consists of buttons. I set Flat style to system in properties window.
But no change in the appearance of the button. It is looking normal.
How can i get this(System Style) affect.
Thanks in Advance
Ramu Medida
|
|
|
|
|
Change your Flat Style as "System" it will take your Operating System style/skins (Ex. XP).
|
|
|
|
|
Im extreamly sorry ., i might misled you please walk through the following
[^]
Thanks
|
|
|
|
|
Thank you Very much.
Thanks and Regards
Ramu
|
|
|
|
|
Hi
I did code to access my control(text box etc) inside the thread but when i upgrade it into VS 2005 it is saying "cross thread operation not valid" how can fix it ?
- Thanks
|
|
|
|
|
Dear Siva,
Is that is happening in debugh mode or it happens in release build also?
I also face the same problem while debugging the application but it works fine in release build.
Regards,
Sunil Tonger
|
|
|
|
|
Control.CheckForIllegalCrossThreadCalls = false;
Put this line in the constructor of your form.
|
|
|
|
|
Yes, when you are doing something referred to as "Illigal" then obvious choice is to disable the check so you can get on with your high quality code.
Look at Invoke and BeginInvoke. Yes, they are annoying, but not half as annoying as the deadlocks you get when not using them.
|
|
|
|
|
Control.CheckForIllegalCrossThreadCalls = false; will this cause any issues?
I have code in 2003 which access controls inside thread and so far it is going good. I placed this command in 2005 and tried it already and it looks OK, i want to make sure by making this "CheckForIllegalCrossThreadCalls" as false will not cause any serious issues. Do you think?
http://www.codeproject.com/csharp/threadsafeforms.asp[^] this should be the right choice but lot of rework
|
|
|
|
|
Of course setting the option to false will cause issues. Microsoft did not add a random unneeded check just for the fun of it.
Typical behaviour will be random hanging your entire GUI. This can happen on all systems, or just a few. It can also appear to be working fine, then suddently start hanging due to an update from Microsoft, a new OS, or whatever.
|
|
|
|
|
just use delegate for invoking them
Here is my code and it's work fine in vs2005
public delegate void CrossThreadHandle(object arg);
void SetLabelStatus(object txt)
{
this.labelDownloadStatus.Text=txt as string;
}
void dl_StatusChanged(Downloader sender, Downloader.DownloadStatus status)
{
CrossThreadHandle dLabel=new CrossThreadHandle(this.SetLabelStatus);
this.Invoke(dLabel,sender.Status.ToString());
Application.DoEvents();
}
Hope it would Help
|
|
|
|
|
|
can i make the setup to detect the .net framework automatically, before the setup of the application take place.so that i don't get the message .net framework is not installed in the machine.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Hi Sonia,
Assuming that you are using .net Setup & Deployment project in VS.
Create a Launch Condition - Add Registry Search - set the RegKey & Value property to:
Keys:
For the .NET Framework 1.0:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v1.0
For the .NET Framework 1.1:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v1.1
For the .NET Framework 2.0:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v2.0
Value:
For the .NET Framework 1.0: "3705"
For the .NET Framework 1.1: "4322"
For the .NET Framework 2.0: "50727"
Then add new LauchCondition and set the Condition property to:
For the .NET Framework 1.0:
REGISTRYVALUE = "3321-3705"
For the .NET Framework 1.1:
REGISTRYVALUE="3706-4322"
For the .NET Framework 2.0:
REGISTRYVALUE="50727-50727"
Hope that helps.
Regards,
Bhupi Bhai.
|
|
|
|
|
what is new launch condition and Condition property ?
Please explain
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
If you are working in VS - 2005 then you should be able to see a Button called Prerequisites on your Setup Project Property. Hit that button and gothrough.
Thanks
|
|
|
|
|
i have gone through that
i selected the second option there, choose the location where the application is residing
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Insted you can select First Option know? It will download from Internet automatically when you deploy into customer place? If you select second option then .Net 2.0 Framework should go along with your application.
Choose which ever you want? And is it help out to you or no?
Thanks
|
|
|
|
|
will u please explain me the steps if i select the option 2
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
|
this does not explain the second option
can u come online at yahoo
soniagupta1@yahoo.co.in
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Yup added ... mine is ct_prakash@yahoo.co.in
|
|
|
|
|
Optional parameters does not exist in C# ?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|