Click here to Skip to main content
15,884,099 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple Classes, same name Pin
Wiep Corbier16-Jun-20 2:26
Wiep Corbier16-Jun-20 2:26 
GeneralRe: Multiple Classes, same name Pin
ZurdoDev16-Jun-20 2:27
professionalZurdoDev16-Jun-20 2:27 
AnswerRe: Multiple Classes, same name Pin
ZurdoDev16-Jun-20 4:05
professionalZurdoDev16-Jun-20 4:05 
AnswerRe: Multiple Classes, same name Pin
Gerry Schmitz16-Jun-20 7:06
mveGerry Schmitz16-Jun-20 7:06 
AnswerRe: Multiple Classes, same name Pin
Patrice T16-Jun-20 8:06
mvePatrice T16-Jun-20 8:06 
AnswerRe: Multiple Classes, same name Pin
Mycroft Holmes16-Jun-20 12:46
professionalMycroft Holmes16-Jun-20 12:46 
AnswerRe: Multiple Classes, same name Pin
Simon_Whale17-Jun-20 2:23
Simon_Whale17-Jun-20 2:23 
AnswerRe: Multiple Classes, same name Pin
#realJSOP21-Jun-20 1:35
mve#realJSOP21-Jun-20 1:35 
You can't have multiple classes with the same name, unless they're in different name spaces.

This won't work:

C#
namespace One
{
    public class ABC {}
    public class ABC {}
}


but this will (as long as you fully qualify all instantiations):

C#
namespace One
{
    public class ABC {}
}

namespace Two
{
    public class ABC {}
}


You could use inheritance, but your class names would still have to be unique.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

GeneralRe: Multiple Classes, same name Pin
Bohdan Stupak29-Jun-20 4:05
professionalBohdan Stupak29-Jun-20 4:05 
AnswerRe: Multiple Classes, same name Pin
Bohdan Stupak29-Jun-20 4:03
professionalBohdan Stupak29-Jun-20 4:03 
QuestionAuthentication Error After migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Rohith PH14-Jun-20 23:42
Rohith PH14-Jun-20 23:42 
AnswerRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Richard Deeming15-Jun-20 0:22
mveRichard Deeming15-Jun-20 0:22 
GeneralRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Rohith PH15-Jun-20 0:32
Rohith PH15-Jun-20 0:32 
GeneralRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Richard Deeming15-Jun-20 0:47
mveRichard Deeming15-Jun-20 0:47 
QuestionRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Rohith PH15-Jun-20 20:45
Rohith PH15-Jun-20 20:45 
AnswerRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Richard Deeming15-Jun-20 22:24
mveRichard Deeming15-Jun-20 22:24 
GeneralRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Rohith PH15-Jun-20 22:56
Rohith PH15-Jun-20 22:56 
GeneralRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Richard Deeming15-Jun-20 23:35
mveRichard Deeming15-Jun-20 23:35 
GeneralRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Rohith PH16-Jun-20 1:02
Rohith PH16-Jun-20 1:02 
GeneralRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Richard Deeming16-Jun-20 1:10
mveRichard Deeming16-Jun-20 1:10 
GeneralRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Rohith PH16-Jun-20 1:31
Rohith PH16-Jun-20 1:31 
GeneralRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Richard Deeming16-Jun-20 2:29
mveRichard Deeming16-Jun-20 2:29 
GeneralRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Rohith PH16-Jun-20 23:40
Rohith PH16-Jun-20 23:40 
GeneralRe: Authentication Error while migration of .net web application from VS2012 (.net 4.0) to VS2019 (.net 4.7.2)project Pin
Richard Deeming16-Jun-20 23:49
mveRichard Deeming16-Jun-20 23:49 
QuestionProblem with serial port Pin
DanTheBest14-Jun-20 5:48
DanTheBest14-Jun-20 5:48 

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.