|
harold aptroot wrote: Poke it with a TCP connection
Poking it might just make it angry and it could POP you.
only two letters away from being an asset
|
|
|
|
|
|
Can anyone tell me what version of C# is installed with Visual Studio 2005? I tried looking at VS help and googled the question with no luck.
|
|
|
|
|
Hi,
I guess it's .NET 2.0, since you can see it's combined with Visual Studio 2005, well, for example, look at the right side of this page[].
|
|
|
|
|
C# V2.0
Or to be more accurate; none. The C# compiler is installed with .net, not with Visual Studio. Visual Studio is simply a front end for the compiler.
|
|
|
|
|
If I run csc /help , I get
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
Hope this helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
He asked about the version of the language, not of the compiler.
|
|
|
|
|
Oops!
**ahem** Version 2.0. Definitely. Yes, 2.0.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
Hello,
I am using
string exePath = System.Windows.Forms.Application.ExecutablePath;
string myFilePath = Path.GetDirectoryName(exePath) + Path.DirectorySeparatorChar + "MyFile.xml";
to get working path of a file and it works fine when i run the application with VS2008.
I have written test method "[TestMethod]" to test a fuctionality which uses the above application path but my test result is failed because if i run test case then the excecutable path refers to visual studio env exe and my file is not present over there.
I don't want to hard code the file path. Please tell me how can i make my test case successfull or get the correct application path.
Thanks in Advance.
|
|
|
|
|
You may be able to use the Assembly class to get the information you require.
Here is the example from the documentation:
Assembly SampleAssembly;
Int32 Integer1 = new Int32();
Type Type1;
Type1 = Integer1.GetType();
SampleAssembly = Assembly.GetAssembly(Integer1.GetType());
Console.WriteLine("CodeBase=" + SampleAssembly.CodeBase);
Look up the documentation for Assembly , particularly ExecutingAssembly and CallingAssembly to decide the best way to proceed for your circumstances.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks Henry,
It is returning the path as "file:\C:\....\\....\TestResults\user_UKNML2009-10-16 16_39_37\Out".
I need debug or application executable path. (If i do some modification in code to reach up to the required path from the assembly path then it will not work for actual application output.)
|
|
|
|
|
I need help with how to copy a row into a new worksheet using C#. Presently I can search for the string but I can't figure out how to grab the row and copy it to a new worksheet. Can anyone help? My code is below.
for (rCnt = 1; rCnt <= range.Rows.Count; rCnt++)
{
for (cCnt = 1; cCnt <= range.Columns.Count; cCnt++)
{
System.Convert.ToString(xlWorkBook);
str = (range.Cells[rCnt, cCnt] as Excel.Range).Value2as string;
if (str == "Yellow")
String.Copy(str); //After if finds the yellow string I want it to copy it to a new worksheet this will take place for all yellow strings.
MessageBox.Show(str);
}
}
|
|
|
|
|
Hi there,
I want to start a process on a remote machine and as soon as the process is complete i want to start a local process.
Keep in mind that:
- I only have the UNC of the remote pc
- The process that must be run is stored on the remote pc and must be run on that pc.
- I do not want to map network drives (although it's highly unlikely that i should)
This is how I would do it if the first process was run on my local machine.
myProcess.Start();
myProcess.WaitForExit()
Thank you,
|
|
|
|
|
diePopster wrote: I want to start a process on a remote machine ...
You are going to need some communications vehicle between the two systems so the initiator sends a message to the remote telling it to start the process, and when it terminates to return a completion message. You could do this with sockets, or maybe WCF, although sockets may be easier to learn. Take a look at some of the links here[^] for more information, or search Google for 'WCF' if you decide on that route.
|
|
|
|
|
I believe you can do this using WMI. Read this[^] article or this[^] post.
Hope it helps.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
hi.
how can I see the list of files that a computer sent or recieved over a lan?
thanks
|
|
|
|
|
I don't think there is a single repository for something like that. Do you mean over a particular protocol?
|
|
|
|
|
FileSystemWatcher class might be of your interest. You can find a lot of samples related to this class' usage on web.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Windows does not track such information. There is no way to tell.
Also, since there are so many different ways of sending files and over so many protocols, there's no single way to find out even if that stuff was tracked.
|
|
|
|
|
hi every body.How can I see the list Of active computers over a lan?
thanks
|
|
|
|
|
hi,
one way is to ping over your network range.
each ping comes back u know the pc is active.
greetz
|
|
|
|
|
I want to write it's code with c#.
|
|
|
|
|
There is an article regarding this right here at CP. Search for that using appropriate keywords.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
what do you mean about stupid???
|
|
|
|