Click here to Skip to main content
15,890,882 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problems in converting colors Pin
Christian Graus18-Jun-06 12:51
protectorChristian Graus18-Jun-06 12:51 
AnswerRe: Problems in converting colors Pin
Graham Nimbley18-Jun-06 12:52
Graham Nimbley18-Jun-06 12:52 
GeneralRe: Problems in converting colors [modified] Pin
Graham Nimbley18-Jun-06 12:55
Graham Nimbley18-Jun-06 12:55 
GeneralRe: Problems in converting colors Pin
AngryC18-Jun-06 13:48
AngryC18-Jun-06 13:48 
QuestionHow can I check if a specific registry entry exists? Pin
AngryC18-Jun-06 11:28
AngryC18-Jun-06 11:28 
AnswerRe: How can I check if a specific registry entry exists? Pin
Graham Nimbley18-Jun-06 13:12
Graham Nimbley18-Jun-06 13:12 
QuestionRename Directory/Folder Pin
QzRz18-Jun-06 9:28
QzRz18-Jun-06 9:28 
AnswerRe: Rename Directory/Folder [modified] Pin
Graham Nimbley18-Jun-06 10:58
Graham Nimbley18-Jun-06 10:58 
Hi.

You can also use Directory.Move(string src,string dest)

Or even DirectoryInfo.MoveTo()

So to use your existing code, this can be simplified to:

private void RenameFolder(DirectoryInfo dir, string NewName)
{
    dir.MoveTo(Path.Combine(dir.Parent.FullName,NewName));
}


Graham

-- modified at 17:12 Sunday 18th June, 2006
GeneralRe: Rename Directory/Folder Pin
QzRz18-Jun-06 11:43
QzRz18-Jun-06 11:43 
Question3 Button clicks to one form Pin
Saamir18-Jun-06 6:21
Saamir18-Jun-06 6:21 
AnswerRe: 3 Button clicks to one form Pin
Jun Du18-Jun-06 10:21
Jun Du18-Jun-06 10:21 
QuestionRe: 3 Button clicks to one form [modified] Pin
Saamir18-Jun-06 12:09
Saamir18-Jun-06 12:09 
AnswerRe: 3 Button clicks to one form Pin
Jun Du18-Jun-06 17:15
Jun Du18-Jun-06 17:15 
GeneralRe: 3 Button clicks to one form Pin
Saamir19-Jun-06 7:42
Saamir19-Jun-06 7:42 
QuestionDataGrid in Windows Application Pin
Mohammad Daba'an18-Jun-06 4:54
Mohammad Daba'an18-Jun-06 4:54 
AnswerRe: DataGrid in Windows Application Pin
Nader Elshehabi19-Jun-06 0:57
Nader Elshehabi19-Jun-06 0:57 
QuestionIs there any way to display a linked text? Pin
printscreen1234518-Jun-06 4:38
printscreen1234518-Jun-06 4:38 
AnswerRe: Is there any way to display a linked text? Pin
Ed.Poore18-Jun-06 8:15
Ed.Poore18-Jun-06 8:15 
AnswerRe: Is there any way to display a linked text? Pin
Graham Nimbley18-Jun-06 11:16
Graham Nimbley18-Jun-06 11:16 
GeneralRe: Is there any way to display a linked text? Pin
printscreen1234518-Jun-06 20:22
printscreen1234518-Jun-06 20:22 
GeneralRe: Is there any way to display a linked text? Pin
Graham Nimbley19-Jun-06 11:41
Graham Nimbley19-Jun-06 11:41 
GeneralRe: Is there any way to display a linked text? Pin
printscreen1234520-Jun-06 18:55
printscreen1234520-Jun-06 18:55 
QuestionEasy question! [modified] Pin
Squee!18-Jun-06 4:13
Squee!18-Jun-06 4:13 
AnswerRe: Easy question! [modified] Pin
User 665818-Jun-06 4:36
User 665818-Jun-06 4:36 
JokeRe: Easy question! Pin
Squee!18-Jun-06 9:22
Squee!18-Jun-06 9:22 

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.