Click here to Skip to main content
14,239,699 members
   

C#

 
GeneralRe: PredicateBuilder Question Pin
Kevin Marois10-Jul-19 7:52
professionalKevin Marois10-Jul-19 7:52 
GeneralRe: PredicateBuilder Question Pin
Luc Pattyn10-Jul-19 7:55
professionalLuc Pattyn10-Jul-19 7:55 
QuestionAvoid ASP Page Refresh after button click Pin
ahmadroheed9-Jul-19 18:04
memberahmadroheed9-Jul-19 18:04 
AnswerRe: Avoid ASP Page Refresh after button click Pin
Gerry Schmitz10-Jul-19 6:22
mveGerry Schmitz10-Jul-19 6:22 
QuestionI have two questions concerning what Visual Studio adds when you make a GUI project Pin
Member 129742359-Jul-19 13:29
memberMember 129742359-Jul-19 13:29 
AnswerRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
Dave Kreskowiak9-Jul-19 14:06
mveDave Kreskowiak9-Jul-19 14:06 
AnswerRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
BillWoodruff9-Jul-19 17:00
mveBillWoodruff9-Jul-19 17:00 
AnswerRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
OriginalGriff9-Jul-19 20:24
protectorOriginalGriff9-Jul-19 20:24 
Namespaces: Dave and Bill have covered that comprehensively.

public partial class MainWindow:Window
(Note that I corrected your typecase: C# is case sensitive, and "public", "partial", and class" are keywords, "Public", "Partial", and "Class" are not so you would get compilation errors with your original code).

public says that the class can be used inside and outside the containing class or namespace: if I reference your Assembly file once you have built it, I can use your class in my code.
partial you know about.
MainWindow:Window You are declaring a class: public partial class starts that, and MainWindow gives it a name. Without a name, you couldn't create an instance of the class which means you (pretty much) can't use it at all. The colon character ':' tells the compiler that this class called MainWindow is derived from an existing class - in this case the base class is called Window. This is called inheritance and you will meet this later in your course or book as it is very much fundamental to C# (and in fact to all OOPs languages). For the moment, just think of it as saying "MainWindow is a Window and I need to specify that if anything is going to work" - inheritance is one of three very important class "attributes" that you will need to learn, probably together, and they are all rather too complicated to cover in a little text box like this!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!


modified 10-Jul-19 3:27am.

GeneralRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
BillWoodruff9-Jul-19 22:20
mveBillWoodruff9-Jul-19 22:20 
GeneralRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
OriginalGriff9-Jul-19 22:25
protectorOriginalGriff9-Jul-19 22:25 
GeneralRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
BillWoodruff10-Jul-19 7:01
mveBillWoodruff10-Jul-19 7:01 
GeneralRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
OriginalGriff10-Jul-19 8:06
protectorOriginalGriff10-Jul-19 8:06 
GeneralRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
Member 1297423510-Jul-19 3:33
memberMember 1297423510-Jul-19 3:33 
GeneralRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
OriginalGriff10-Jul-19 4:34
protectorOriginalGriff10-Jul-19 4:34 
GeneralRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
BillWoodruff10-Jul-19 6:43
mveBillWoodruff10-Jul-19 6:43 
AnswerRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
Gerry Schmitz10-Jul-19 6:49
mveGerry Schmitz10-Jul-19 6:49 
QuestionTo me this error msg is very cryptic! I am using VS2017 with MS Excel 2007 Pin
Greg Gonzales8-Jul-19 11:43
memberGreg Gonzales8-Jul-19 11:43 
AnswerRe: To me this error msg is very cryptic! I am using VS2017 with MS Excel 2007 Pin
Dave Kreskowiak8-Jul-19 11:54
mveDave Kreskowiak8-Jul-19 11:54 
GeneralRe: To me this error msg is very cryptic! I am using VS2017 with MS Excel 2007 Pin
Greg Gonzales8-Jul-19 17:09
memberGreg Gonzales8-Jul-19 17:09 
Questionhelp Pin
Member 145235257-Jul-19 13:40
memberMember 145235257-Jul-19 13:40 
AnswerRe: help Pin
Mycroft Holmes7-Jul-19 17:48
memberMycroft Holmes7-Jul-19 17:48 
GeneralRe: help Pin
OriginalGriff7-Jul-19 18:46
protectorOriginalGriff7-Jul-19 18:46 
GeneralRe: help Pin
Member 145235257-Jul-19 21:49
memberMember 145235257-Jul-19 21:49 
GeneralRe: help Pin
OriginalGriff7-Jul-19 22:09
protectorOriginalGriff7-Jul-19 22:09 
GeneralRe: help Pin
Member 145235257-Jul-19 21:50
memberMember 145235257-Jul-19 21:50 

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.