|
Thats what, i don't want any dependent projects to re-built as almost 50% of the projects are dependent on which i have changed. (help really urgent)
santosh
|
|
|
|
|
But then you're running dirty code: if projects B and C depend on A, and A has been changed, then B and C have to be rebuilt otherwise they could be referecing functions, properties, and variables in A that no longer exist or may have changed.
I recommend asking this question in the Visual Studio forum or in the MSDN Visual Studio forum for a better answer though; I'm not sure if you can tell VS to not rebuild a project even if it is dependent on a modified project.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Try enabling incremental compilation in each and every project (all 100 )
|
|
|
|
|
My app creates a data array that quite happily serializes to disk from a control. If I run another part of the app that generates a data array (I'm assuming correctly as I have no evidence that its not) from a MainForm toolbar, and try to serialize (using Stream and BinaryFormatter) from the same control above, I get an exception that complains that the MainForm (derived from Form) is not marked as Serializable. Changing it to Serializable does not help, and it feels like a band-aid fix anyway.
I believe this message is a symptom of the problem, which I suspect is a section of one of my classes that should have the [NonSerialized] attribute. I have not been able to locate this as yet.
Can anyone offer suggestions what what would cause this?
Stewart DIBBS
|
|
|
|
|
Do you need to serialize your main form? If not, don't serialize it. Whatever object you're trying to serialize, make sure it doesn't contain a reference to the main form, otherwise it will try to serialize it. If it is referencing the main form for a good reason, then add the NonSerializedAttribute to it.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
OK, I see my problem: the serializable class exports an event. The first pass through does not subscribe to the event and serialization works OK, but the second pass does subscribe to the event and the handler is in the mainform code. Hence the seriealization exception I get.
So I have to move the event out of the serialization class. Wasn't happy with the code anyway.
Stewart DIBBS
|
|
|
|
|
I am using MethodInfo.Invoke() to invoke a method that has a ref keyword on a value type in it's parameter list. Example:
MyMethod(int p1, ref int p2)
However there does not seem to be a way to to tell invoke to pass parameter 2 by reference.
I tried to use ParameterModifier. But it has work just with COM interop.
Please help, I am getting an error because it is trying to pass by value instead of pass by reference.
King Regards,
XironiX
[ _ Always there is another way _ ]
-- modified at 11:48 Monday 8th May, 2006
|
|
|
|
|
int param1 = 5;
int param2 = 10;
object[] arguments = { param1, param2 };
theMethod.Invoke(arguments);
param2 = (int)arguments[1];
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Dear Judah,
Thanx for your instant reply.I have another problem with pass-by-ref concept.I have two overloaded methods with the following signatures :
public int MyMethod(ref int intParam)
{
intParam += 100;
return Math.Sin(intParam);
}
public int MyMethod(int intParam)
{
intParam += 100;
return Math.Sin(intParam);
}
When I use typeof(MyClass).GetMethod("MyMethod"); ,System.Reflection.AmbiguousMatchException is throw !!
If I use
typeof(MyClass).GetMethod("MyMethod",new Type [] {typeof(int)});
The second overloaded method with the value parameter invokes.
How can I force the CLR to run the first method and pass the parameter to it by reference ?
Regards,
Xironix
[ _ Always there is another way _ ]
-- modified at 3:13 Tuesday 9th May, 2006
|
|
|
|
|
I'm opening the port as a file by pinvoking several win32 calls similar to the Mc++ implementation below. The problem is that each write causes a .1s stall in my app. I'm only writing 4bytes max at a time, and the delay's remained constant from 2400-19200 baud so actually stuffing the bytes into the uart buffer doesn't appear to be the source of my problem.
http://www.codeproject.com/managedcpp/howtocomport.asp
|
|
|
|
|
|
Ok, did an ~20s trial run.
Slowest lines of code were two where I called CSerialPort.Write(...) ~8s net. and the actual write to the stream in Write.
Slowest methods were:
Forms.UnsafeNativeMethods.WaitMessage() 18s
System.Threading.WaitHandle.WaitOne() 8s
UnsafeNativeMethods.* isn't listed in MSDN help.
Honestly, I don't see that I'm any closer to a resolution.
public void Write(byte[] buf)
{
try
{
m_MyStreamWriter.Write(buf);
m_MyStreamWriter.Flush();
}
catch (Exception e )
{
Console.WriteLine(e.ToString());
}
}
|
|
|
|
|
What I think I need is a way to do the write asyncronously, although that potentially opens up a whole new can of worms with multiple writes piling up over top of each other. Agregating multiple messages and sending them in a single chunk would be another option but I don't currently have access to the blackbox I'm interfacing against, nor do I have specs on its uart or how frequently it checks the buffer.
-- modified at 15:23 Monday 8th May, 2006
Something else that's occured to me, could my not having a null modem hooked up be causing the delay with windows trying and failing to send before giving up?
|
|
|
|
|
Hi PrjectCode Team Thank You For Your Successfull Site That Help Many Developers And Beginners To Develop Their Projects Really I'd like To Ask A Question That Question Is:
How Can I Load The SQL Server DataBases Into A Combo Box Using The ADO.Net And C# And Their Tables In Another One According To The Database That I'll Choose From The Combobox1 ?
Thank You For All Your Efforts
Night Attack
|
|
|
|
|
You Might Want To Break Your Question Down Into Specific Problems Or Issues You Are Having, Currently Your Question Is A Bit Garbled And Does Not Make Much Sense.
Also, We Tend To Reserve Upper Case First Characters For The Beginning Of A Sentence, A Person's Name Or A Place Name.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
hi all,
i have two forms one in my language and one in english. first i open the one in my language then i select english one from menustrip (language option).
but i want the first one to be closed when i open the second one.
and vice versa. (if english is open and i select the native one, i want english one to be closed.)
if i use Close(); when opening the second form, both forms are closed
how can i achieve my goal ?
help please,
bye.
|
|
|
|
|
Have you tried hiding the form instead of closing it? form_english.hide()?
|
|
|
|
|
From your post I assume that you've implemented the same form twice, just with different languages for the user interface. That isn't the best way to do it. .NET provides good support for globalization and lovalization of windows applications, which is very good covered on MSDN[^].
To change the lanuage of your user interface at runtime e.g. via the menustrip, take a look at my article: Change culture of user interface at runtime[^].
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
Change your Program.cs file to this:
static class Program
{
public static ApplicationContext CurrentContext;
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
CurrentContext = new ApplicationContext(new Form1());
Application.Run(CurrentContext);
}
}
Then in your handler to close Form1 do this.
Form2 dlg = new Form2();
dlg.Show();
Program.CurrentContext.MainForm = dlg;
base.Close();
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
I'm developing a library, when I try to convert float to string, in case of a point it set a coma, what can I do about it?
|
|
|
|
|
A comma usually denotes a thousands seperator, at least in English numbering. For example, one might write 1000 as
1,000
Is this what you're trying to parse? Or is a comma truely in place of a decimal point, for example, instead of 1.5 it's 1,5?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
That's exactly what's happening, but the coma are in the point place in one of my projects, not in others, I suspect is something related with my project language, any idea please?
|
|
|
|
|
Specify a fixed culture when converting the float to a string.
float x = (float) 0.6;
x.ToString(new CultureInfo("en-US")));
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
Yes for sure, thats right, the point it's do that in a global level, (in my app domain) anyway was really helpfull you idea Troschutz, wolud you help on that too??? thnx & sorry for the inconvenience.
|
|
|
|
|
If no culture is specified, ToString and similar methods use the value of the CurrentCulture property of the current thread. So do:
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|