tag:blogger.com,1999:blog-5586318762560436784.post4303554195708194900..comments2023-10-04T01:59:09.408-07:00Comments on C# Interview Questions: C# Interview Questions on partial classes, structs and methods.Unknownnoreply@blogger.comBlogger14125tag:blogger.com,1999:blog-5586318762560436784.post-30219843797366893482016-04-03T11:51:02.639-07:002016-04-03T11:51:02.639-07:00how does the partial classes(user defined class sp...how does the partial classes(user defined class split) combine during compile time? do we use versioning here? Please reply a little briefly....it was asked in an interviewAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-29477128655536136272016-04-03T11:46:15.907-07:002016-04-03T11:46:15.907-07:00how does the partial classes are combined during c...how does the partial classes are combined during compile time? Anonymoushttps://www.blogger.com/profile/18037622275721358492noreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-28938975792066078042015-12-20T10:07:33.502-08:002015-12-20T10:07:33.502-08:00can we have same method name in partial classes......can we have same method name in partial classes... ( one of the interview question I have faced in an mnc interview)... plz help mesantoshhttps://www.blogger.com/profile/05624630506413495766noreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-59922371538830495242015-01-27T03:55:55.355-08:002015-01-27T03:55:55.355-08:00No , it gives compile time errorNo , it gives compile time errorAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-36903847997220837902012-11-03T02:43:04.126-07:002012-11-03T02:43:04.126-07:00in early .NET 1.0 framework the design(i,e aspx)an...in early .NET 1.0 framework the design(i,e aspx)and code behind(now called .cs) used to reside in same form which lead to confusion.so they made aspx.cs as partial so when compiled it will merge with aspx.and completes the class.which made developing applications simpler with no confusionsAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-63916810517327466672012-07-03T18:29:28.775-07:002012-07-03T18:29:28.775-07:00what ispartial meanswhat ispartial meansAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-66789883737261455232011-07-14T07:23:36.889-07:002011-07-14T07:23:36.889-07:00i was searching this concept from so many days..Th...i was searching this concept from so many days..Thanks VenkatAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-55696921679366353662011-06-08T02:53:11.634-07:002011-06-08T02:53:11.634-07:00In ASP.NET, Why aspx.cs class is always declared p...In ASP.NET, Why aspx.cs class is always declared partial?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-35863476759290348922011-04-18T18:02:21.820-07:002011-04-18T18:02:21.820-07:00Do all the parts of partial class need to be in on...Do all the parts of partial class need to be in one namespace<br /><br />All parts must be defined within the same namespace.<br /><br />All the parts must use the partial keyword.<br /><br />All of the parts must be available at compile time to form the final type.<br /><br />All the parts must have the same accessibility (i.e. public, private, etc.).<br /><br />If any of the parts are declared abstract, then the entire type is abstract.<br /><br />If any of the parts are declared sealed, then the entire type is sealed.<br /><br />If any of the parts declare a base type, then all parts use that same base type. All parts that specify a base class must specify the same base class. You can omit a base class in one or more of the parts in which case the part still uses the same base class.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-19604948165700178292011-03-02T09:36:50.661-08:002011-03-02T09:36:50.661-08:00Do all the parts of partial class need to be in on...Do all the parts of partial class need to be in one namespaceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-88550460853935353962010-01-03T01:51:01.333-08:002010-01-03T01:51:01.333-08:00Q:I have a class which is splitted into two partia...Q:I have a class which is splitted into two partial classes.these two partial classes have same methods.what happens when we compile<br /><br />Answer: At compile time all partial classes will be combined together to form a single final class. In same class we cannot have multiple methods with same name.But of course method overloading possible.I hope I have solved your questionAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-63298240011561985742009-12-22T05:10:04.060-08:002009-12-22T05:10:04.060-08:00Hi,I have a question.I have a class which is split...Hi,I have a question.I have a class which is splitted into two partial classes.these two partial classes have same methods.what happens when we compile.I faced this question in one of the MNC interview.please help me.Thanks in advanceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-25960578789050011402009-11-11T21:49:23.492-08:002009-11-11T21:49:23.492-08:00Error will occur during compilation time -"c...Error will occur during compilation time -"class already defines a member with the same parameter types"Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5586318762560436784.post-65011650222381827832009-08-11T23:51:04.125-07:002009-08-11T23:51:04.125-07:00Can we have same method name in partial classes..?...Can we have same method name in partial classes..?Unknownhttps://www.blogger.com/profile/17967229368759283821noreply@blogger.com