Click here to Skip to main content
15,896,348 members
Home / Discussions / C#
   

C#

 
GeneralRe: timers in listview Pin
snehanp4-Jun-09 0:43
snehanp4-Jun-09 0:43 
AnswerRe: timers in listview Pin
Pete O'Hanlon4-Jun-09 4:38
mvePete O'Hanlon4-Jun-09 4:38 
GeneralRe: timers in listview [modified] Pin
snehanp4-Jun-09 19:40
snehanp4-Jun-09 19:40 
GeneralRe: timers in listview Pin
Pete O'Hanlon5-Jun-09 1:15
mvePete O'Hanlon5-Jun-09 1:15 
Questionwindow MDI form Pin
Narsimha093-Jun-09 23:35
Narsimha093-Jun-09 23:35 
AnswerRe: window MDI form Pin
Rajdeep.NET3-Jun-09 23:48
Rajdeep.NET3-Jun-09 23:48 
GeneralRe: window MDI form Pin
Narsimha094-Jun-09 0:06
Narsimha094-Jun-09 0:06 
AnswerRe: window MDI form Pin
Mycroft Holmes4-Jun-09 0:58
professionalMycroft Holmes4-Jun-09 0:58 
QuestionHow to get a .Net Control of a web page in c# Pin
Yukivi3-Jun-09 23:20
Yukivi3-Jun-09 23:20 
AnswerRe: How to get a .Net Control of a web page in c# Pin
Henry Minute4-Jun-09 2:44
Henry Minute4-Jun-09 2:44 
QuestionZero's before number. Pin
Satish - Developer3-Jun-09 22:59
Satish - Developer3-Jun-09 22:59 
AnswerRe: Zero's before number. Pin
0x3c03-Jun-09 23:15
0x3c03-Jun-09 23:15 
AnswerRe: Zero's before number. Pin
Christian Graus3-Jun-09 23:17
protectorChristian Graus3-Jun-09 23:17 
AnswerRe: Zero's before number. Pin
Pete O'Hanlon3-Jun-09 23:22
mvePete O'Hanlon3-Jun-09 23:22 
AnswerRe: Zero's before number. Pin
CPallini4-Jun-09 0:54
mveCPallini4-Jun-09 0:54 
AnswerRe: Zero's before number. Pin
Lutosław4-Jun-09 1:46
Lutosław4-Jun-09 1:46 
AnswerRe: Zero's before number. Pin
Searril4-Jun-09 3:13
Searril4-Jun-09 3:13 
GeneralRe: Zero's before number. Pin
Lutosław6-Jun-09 1:50
Lutosław6-Jun-09 1:50 
QuestionCheck this out guys! Pin
Rajdeep.NET3-Jun-09 22:24
Rajdeep.NET3-Jun-09 22:24 
Hi guys,

I had just posted a question about getting the path of the current executable. Thanks to all those who responded. However, I found this peice of code while googling just now, and this really seems to work:

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
            string baseDir = System.IO.Path.GetDirectoryName(a.Location);
            Console.WriteLine(baseDir);
            Console.ReadLine();
        }
    }
}


Here, Console.WriteLine(baseDir); prints the path of the .exe.

However, I want that the current executable be copied and moved using the System.IO; .NET class library namespace.

Some thing like this:

Instead of printing the path address with Console.WriteLine(baseDir);, I want to replace it with: System.IO.File.Copy("basedir", "C:\\desiredlocation");

But this code:
System.IO.File.Copy("basedir", "C:\\desiredlocation");
doesn't seem to work.

Can anyone help me out?
AnswerRe: Check this out guys! Pin
0x3c03-Jun-09 22:27
0x3c03-Jun-09 22:27 
GeneralRe: Check this out guys! Pin
Rajdeep.NET3-Jun-09 23:01
Rajdeep.NET3-Jun-09 23:01 
GeneralRe: Check this out guys! Pin
0x3c04-Jun-09 1:36
0x3c04-Jun-09 1:36 
AnswerRe: Check this out guys! Pin
Pete O'Hanlon3-Jun-09 22:28
mvePete O'Hanlon3-Jun-09 22:28 
GeneralRe: Check this out guys! Pin
Rajdeep.NET3-Jun-09 22:52
Rajdeep.NET3-Jun-09 22:52 
GeneralRe: Check this out guys! Pin
0x3c03-Jun-09 22:58
0x3c03-Jun-09 22:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.