|
Umm.. Im currently using visual studio 2005 and my problem is everytime i create a copy of a windows application project..(example WIndowsApplications2)
and i change its content using another pc..and everytime i compile it.. the original contents are the ones shown in the screen.. not the new thing i have already change...
and everytime i change the first form to be displayed in the program.cs the form that is being displayed is the last form being compiled. For example i've change it to form5 but its showing Form12...
please help... thank you very much...
|
|
|
|
|
Are you sure it's building ? Are you sure you're not working in debug and copying the release exe ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Im sure its building.. its compiling the whole application but it keeps showing the last form compiled..
i think the problem is because of its the copied file?
|
|
|
|
|
There are two folders, debug and release. I think you're copying one and building the other.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
im copying thw whole application when i tried to erase the exe file in the debug folder its just the same. it keeps showing the form that's not meant to be shown...
is there a way that i could run it with the new content?
its very frustrating...thanks for your help...
|
|
|
|
|
Within Visual Studio, if you have more than one project in your solution, and hit the
icon (or the key combination) to run, it will execute the one project
"set as startup project" (context menu item in solution explorer pane).
Maybe you have forgotten to set it to the one you want to run ?
|
|
|
|
|
How can I decompile a C# executible file and see the source code?
|
|
|
|
|
Eddymvp wrote: How can I decompile a C# executible file and see the source code?
With Lutz Roeder's Reflector[^]
NOTE: This will NOT give you the original source code. The compiler will make various optimisations to the code when it compiles it so the code that Reflector produces will be functionally equivalent but not the original.
|
|
|
|
|
I tried using that, but it doesn't give me the option to extract the class the create a new project.
|
|
|
|
|
Well... you didn't ask for that.
Do you really need a program to do that for you? You can just copy the code and paste it into a project that you create yourself.
---
single minded; short sighted; long gone;
|
|
|
|
|
There are addins for that, look for FileDisassembler.
|
|
|
|
|
Hello,
Let's say I have the following variables:
string var1 = "5567 87865 4432 54535 6678 4435";
string var2 = "667 332 32 555677 4465 44444444";
string part_of_var1 = "4432 54535";
string xxx = String.Empty;
I want to have in xxx: 32 555677!
Notice that part_of_var1 contains the third and fourth parts of var1. I want to have 32 555677 in xxx var because it is the third and fourth parts of var2.
I hope it's clear!
Please help. Your help would be much appreciated.
|
|
|
|
|
I'm not really sure what you are trying to achieve here, but you can achieve what you want to do quite easily (and without hardcoding the result):
string[] splitter = var2.Split(' ');
if (splitter != null && splitter.Length > 4)
{
xxx = string.Format("{0} {1}", splitter[2], splitter[3]);
}
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
Thank you very much. The problem is I don't know the position at design or runtime. The only clue I have is the value of part_of_var1 variable.
So maybe I have to count spaces?
Thank again.
|
|
|
|
|
I think this will come close to what you want:
public void test() {
string var1 = "5567 87865 4432 54535 6678 4435";
string var2 = "667 332 32 555677 4465 44444444";
string part_of_var1 = "4432 54535";
string xxx=getPartsOfVar2(var1, var2, part_of_var1, ' ');
Console.WriteLine(xxx);
|
public string getPartsOfVar2(string var1, string var2, string part_of_var1, char sep) {
string[] arr1=var1.Split(sep);
string[] arr2=var2.Split(sep);
if (arr1.Length!=arr2.Length) throw some exception;
string[] arr1p=part_of_var1.Split(sep);
int partCount=arr1p.Length;
string[] arr2p=new string[partCount];
for(int i=0; i<partCount; i++) {
string part=arr1p[i];
int index=arr1.IndexOf(part);
if (index<0) throw some exception;
arr2p[i]=arr2[index];
}
return String.Join(sep, arr2p);
}
|
|
|
|
|
Hello Luc,
I'm getting the following errors when I'm trying to compile the code:
Error 1 No overload for method 'IndexOf' takes '1' arguments ccc.cs 626 19 ccc
Error 2 The best overloaded method match for 'string.Join(string, string[])' has some invalid arguments ccc.cs 630 12 ccc
Error 3 Argument '1': cannot convert from 'char' to 'string' ccc.cs 630 24 ccc
|
|
|
|
|
I did not compile/run so you have to check the documentation and make small adaptations.
As an example Array.IndexOf seems to be a static method with two args, so study and
correct it.
|
|
|
|
|
Split var1 by part_of_var1, so that you get an array with two items. Count the number of spaces in each of them and put in s1 and s2. Split var2 by space, then join that array again except the first s1 items and the last s2 items.
Not dizzy yet...
---
single minded; short sighted; long gone;
|
|
|
|
|
Can you please give me some code, I'm really a beginner in C#.
|
|
|
|
|
I figured out exactly how to do it for you. Can't you at least make an attempt at writing the code yourself?
---
single minded; short sighted; long gone;
|
|
|
|
|
Ok sorry
I did what you said except:
"then join that array again except the first s1 items and the last s2 items."
How can I do that?
Thanks a lot.
|
|
|
|
|
I'm still trying but I can't figure out how to "join that array again except the first s1 items and the last s2 items."
|
|
|
|
|
Use the String.Join method, like this:
string result = String.Join(" ", arrayOfStrings, s1, arrayOfStrings.Length - s1 - s2)
---
single minded; short sighted; long gone;
|
|
|
|
|
|
Looking at MSDN overview of collections, I can not find anything about set.
How would you represent an unordered set of references in C#? The set will hold up to about million of references and I need fast Contains, Insert/Remove operations. I don't need intersection, union...
|
|
|
|