Click here to Skip to main content
14,664,157 members
Home » Discussions » C#
   

C#

 
QuestionC# windows application: how to enable and disable scrollbars in datagridview programatically? Pin
Rajasekaran Bose17-Jun-20 23:53
MemberRajasekaran Bose17-Jun-20 23:53 
AnswerRe: C# windows application: how to enable and disable scrollbars in datagridview programatically? Pin
Richard MacCutchan18-Jun-20 0:41
mveRichard MacCutchan18-Jun-20 0:41 
QuestionAnyone working with the new VS2019 .Net NI-VISA driver? Pin
SunshineDesign16-Jun-20 15:58
MemberSunshineDesign16-Jun-20 15:58 
AnswerRe: Anyone working with the new VS2019 .Net NI-VISA driver? Pin
Richard MacCutchan16-Jun-20 21:01
mveRichard MacCutchan16-Jun-20 21:01 
GeneralRe: Anyone working with the new VS2019 .Net NI-VISA driver? Pin
SunshineDesign17-Jun-20 7:00
MemberSunshineDesign17-Jun-20 7:00 
AnswerRe: Anyone working with the new VS2019 .Net NI-VISA driver? Pin
Pawel Wzietek30-Jun-20 18:50
MemberPawel Wzietek30-Jun-20 18:50 
QuestionMultiple Classes, same name Pin
Wiep Corbier15-Jun-20 22:20
MemberWiep Corbier15-Jun-20 22:20 
AnswerRe: Multiple Classes, same name Pin
Richard Deeming15-Jun-20 22:31
mveRichard Deeming15-Jun-20 22:31 
Wiep Corbier wrote:
Will this ever happen and if not, why not?
No, because you create a instances of your class at run-time, and you don't want the user to be presented with a pop-up when your application is running asking them to pick which class to instantiate.

You can already have different classes with the same name if they're in different namespaces.

You can have different classes with the same name and namespace if they're in different assemblies, with no reference between the two. But they're an absolute pain to use. You have to create an "external alias" for each reference in order to disambiguate them.

Computers aren't magic. They can't "guess" which class you meant to use. And if two classes have the same name in the same namespace, with no "external alias" to disambiguate them, then there is no way for the computer to uniquely represent the class you want to use.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Multiple Classes, same name Pin
Wiep Corbier15-Jun-20 22:42
MemberWiep Corbier15-Jun-20 22:42 
GeneralRe: Multiple Classes, same name Pin
Richard Deeming15-Jun-20 22:47
mveRichard Deeming15-Jun-20 22:47 
GeneralRe: Multiple Classes, same name Pin
Wiep Corbier15-Jun-20 22:56
MemberWiep Corbier15-Jun-20 22:56 
GeneralRe: Multiple Classes, same name Pin
Richard Deeming15-Jun-20 23:47
mveRichard Deeming15-Jun-20 23:47 
GeneralRe: Multiple Classes, same name Pin
Member 798912216-Jun-20 0:05
MemberMember 798912216-Jun-20 0:05 
GeneralRe: Multiple Classes, same name Pin
Richard Deeming16-Jun-20 0:31
mveRichard Deeming16-Jun-20 0:31 
GeneralRe: Multiple Classes, same name Pin
Member 798912216-Jun-20 0:44
MemberMember 798912216-Jun-20 0:44 
GeneralRe: Multiple Classes, same name Pin
Wiep Corbier16-Jun-20 0:20
MemberWiep Corbier16-Jun-20 0:20 
GeneralRe: Multiple Classes, same name Pin
Richard Deeming16-Jun-20 0:28
mveRichard Deeming16-Jun-20 0:28 
AnswerRe: Multiple Classes, same name Pin
ZurdoDev16-Jun-20 2:16
mveZurdoDev16-Jun-20 2:16 
GeneralRe: Multiple Classes, same name Pin
ZurdoDev16-Jun-20 2:18
mveZurdoDev16-Jun-20 2:18 
GeneralRe: Multiple Classes, same name Pin
Dave Kreskowiak16-Jun-20 3:16
mveDave Kreskowiak16-Jun-20 3:16 
GeneralRe: Multiple Classes, same name Pin
Nelek22-Jun-20 5:53
protectorNelek22-Jun-20 5:53 
AnswerRe: Multiple Classes, same name Pin
OriginalGriff15-Jun-20 22:32
mveOriginalGriff15-Jun-20 22:32 
AnswerRe: Multiple Classes, same name Pin
Richard MacCutchan16-Jun-20 0:27
mveRichard MacCutchan16-Jun-20 0:27 
GeneralRe: Multiple Classes, same name Pin
Wiep Corbier16-Jun-20 0:36
MemberWiep Corbier16-Jun-20 0:36 
GeneralRe: Multiple Classes, same name Pin
Richard MacCutchan16-Jun-20 0:52
mveRichard MacCutchan16-Jun-20 0:52 

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.