what are partial classes and their use?
Answer Posted / arunajyothi.m
“partial” keyword can be used to split a single class,
interface, or struct into multiple, separate files in
ASP.NET (using C# as the language). This permits multiple
developers to works on these files, which can later be
treated as a single unit by the compiler at the time of
compilation and compiled into MSIL code.
1.Partial classes can improve code readability and
maintainability by providing a powerful way to extend the
behavior of a class and attach functionality to it.
2.The partial modifier can only appear immediately before
the keywords class, struct, or interface.
3.Nested partial types are allowed in partial-type
definitions.
4.Using partial classes helps to split your class
definition into multiple physical files.
5.Note that the partial keyword applies to classes,
structs, and interfaces, but not enums
Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
How could you modify xaml content from javascript?
What is new asp.net core?
Explain the main function of razor in asp.net? : asp.net mvc
Hello, Using Visual Studio 2005 (VB) I am working to create a Web Site implementing the following: Within a gridView I have placed a dropdownlist control with a DataSourceID="SDSLkupList". SDSLkupList is a sqlDataSource used to store a lookup list for dropdownlist translation from ID to text. SDSLkupList contains the translation text and other fields related to the dropdown selection ID. (Thought it would be efficient to get everything at the same time.) I would like to provide the user the ability to select from the dropdownlist and, based on the selection, use labels to list related columns stored on the SDSLkupList in separate gridView columns. I have read that SqlDataSources are not meant to be used for individual controls. Since SDSLkupList contains all related information, is there a way to do a find using the dropdownlist selectedValue? (I was not able to discover one.) Otherwise, what should I use? It would need to set the labels on the gridView DataRowBound event as well as the SelectedIndexChanged events. Has anyone done this? Any help would be appreciated. Thanks in Advance. Neal
Is there any alternative to avoid name collisions other then Namespaces?
A web service can only be written in .net? State whether true or false.
Explain how can we inherit a static variable?
How to count the number of objects present in a web page? How to count the number of radio buttons in a web page?
What is view state management in asp net?
What is difference between or and orelse?
How to rename a table using sql queries?
How does asp page work?
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
Where can I get the details on migration of existing projects using various technologies to asp.net?
Can we set master page as a start page?