Click here to Skip to main content
15,919,613 members
Home / Discussions / C#
   

C#

 
GeneralRe: Format SQL statement into C# string. Pin
Brady Kelly19-Oct-09 11:21
Brady Kelly19-Oct-09 11:21 
GeneralRe: Format SQL statement into C# string. Pin
Not Active19-Oct-09 11:51
mentorNot Active19-Oct-09 11:51 
GeneralRe: Format SQL statement into C# string. Pin
PIEBALDconsult19-Oct-09 15:37
mvePIEBALDconsult19-Oct-09 15:37 
AnswerRe: Format SQL statement into C# string. PinPopular
AspDotNetDev19-Oct-09 10:25
protectorAspDotNetDev19-Oct-09 10:25 
GeneralRe: Format SQL statement into C# string. Pin
Mycroft Holmes19-Oct-09 12:23
professionalMycroft Holmes19-Oct-09 12:23 
QuestionA problem with namespace? Pin
George Quarton19-Oct-09 5:15
George Quarton19-Oct-09 5:15 
AnswerRe: A problem with namespace? Pin
Luc Pattyn19-Oct-09 6:12
sitebuilderLuc Pattyn19-Oct-09 6:12 
GeneralRe: A problem with namespace? Pin
George Quarton19-Oct-09 6:31
George Quarton19-Oct-09 6:31 
Firstly thanks for your reply Luc, I appreciate it. Now, there must of been some confusion, I guess I didnt state it correctly.

The COM error that I showed here is an error I got when my code was (apparently working, besides that run-time error) and I seeked online for suggestions on possible solutions and I came across that the program needs Full Trust for it to work. So I changed the project to full trust in project settings and yet the error still persisted. I was able to run the program at this point.

I was then stumped, had no idea what to do until I saw that my main class 'PenDriveBackup' (which resides in Main.cs) had the modifiers 'public partial'.
So the class looked like 'public partial PenDriveBackup : Form'. I removed the partial from the class and went into my Main.Designer.cs where I removed the partial from that class too which then went from 'public partial class PenDriveBackup' to 'public class PenDriveBackup'.

Upon doing this the error, "Error1 The namespace 'PenDriveBackupProgram' already contains a definition for 'PenDriveBackup'" occurs unabling me to compile and that is the current state im in.

My project consists of five items;
Main.cs -> Where most of my code sits.
MessageBoxForm.cs -> Custom message form, used to determine either incremental or full backup.
InputBoxForm.cs -> Custom input box, used to determine where the user wants to backup.
USBSerialNumber.cs -> A class file downloaded from the internet.
And ofcourse, Program.cs

Using the Find function I managed to see which items included the class PenDriveBackup.
Main.cs -> One class, being PenDriveBackup
-> Main.Designer.cs -> A class in here is called PenDriveBackup but as it belongs to Main.cs it can't be the problem?
MessageBoxForm.cs -> Found no class called PenDriveBackup
InputBoxForm.cs ->; Found no class called PenDriveBackup
USBSerialNumber.cs ->; Found no class called PenDriveBackup

I hope I have provided suffecient information to help you, I have been tearing my hair out for the last few days.
Oh and something that may help, if I were to build the USBSerialNumber.cs form in its own project it works. Thats why I thought the modifier partial was causing the problem.

Thanks again Luc!
GeneralRe: A problem with namespace? Pin
Luc Pattyn19-Oct-09 6:48
sitebuilderLuc Pattyn19-Oct-09 6:48 
GeneralRe: A problem with namespace? Pin
Luc Pattyn19-Oct-09 9:16
sitebuilderLuc Pattyn19-Oct-09 9:16 
GeneralRe: A problem with namespace? Pin
George Quarton19-Oct-09 11:50
George Quarton19-Oct-09 11:50 
QuestionReplication Classes Pin
md_refay19-Oct-09 4:37
md_refay19-Oct-09 4:37 
QuestionCustomer user control load screen Pin
gdub19-Oct-09 4:24
gdub19-Oct-09 4:24 
AnswerRe: Customer user control load screen Pin
Not Active19-Oct-09 4:55
mentorNot Active19-Oct-09 4:55 
AnswerRe: Customer user control load screen Pin
benjymous19-Oct-09 4:55
benjymous19-Oct-09 4:55 
GeneralRe: Customer user control load screen Pin
Not Active19-Oct-09 5:47
mentorNot Active19-Oct-09 5:47 
GeneralRe: Customer user control load screen Pin
gdub19-Oct-09 7:23
gdub19-Oct-09 7:23 
GeneralRe: Customer user control load screen Pin
Not Active19-Oct-09 7:49
mentorNot Active19-Oct-09 7:49 
QuestionLow priority: Visual Studio IDE, string literals, convenience. Pin
LimitedAtonement19-Oct-09 3:42
LimitedAtonement19-Oct-09 3:42 
AnswerRe: Low priority: Visual Studio IDE, string literals, convenience. Pin
Luc Pattyn19-Oct-09 5:09
sitebuilderLuc Pattyn19-Oct-09 5:09 
GeneralRe: Low priority: Visual Studio IDE, string literals, convenience. Pin
LimitedAtonement19-Oct-09 5:33
LimitedAtonement19-Oct-09 5:33 
GeneralRe: Low priority: Visual Studio IDE, string literals, convenience. Pin
Dave Kreskowiak19-Oct-09 5:43
mveDave Kreskowiak19-Oct-09 5:43 
GeneralRe: Low priority: Visual Studio IDE, string literals, convenience. Pin
Luc Pattyn19-Oct-09 5:46
sitebuilderLuc Pattyn19-Oct-09 5:46 
GeneralRe: Low priority: Visual Studio IDE, string literals, convenience. Pin
LimitedAtonement19-Oct-09 7:30
LimitedAtonement19-Oct-09 7:30 
QuestionProject deployment Pin
jashimu19-Oct-09 3:21
jashimu19-Oct-09 3:21 

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.