what are partial classes?

Answer Posted / anil

Partial class is th one feature in V2.0 where you can split
the functionalty of the single file in multiple files.

This is helpful on working simultaneously on same file,
clearly separates Business Logic and UI, separets logic
from single file to multiple files.

File1
Imports system
Interface IPartialInterface

sub abc( byval str as string)
sub abc()
End interface

Partial Class DemoPartialClass
dim strName a string
strName = "Anil"
Response.Write(strName)
End Class

File2

Imports system
Implements IPartialInterface

Partial Class DemoPartialClass
Public sub abc(ByVal strName as string)
Dim strValue as string
strValue = strName
End Sub
End Class

File 3

Imports system
Implements IPartialInterface

Partial Class DemoPartialClass
public sub abc()
response.write(strName)
End Sub
End Class

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the new features 3.5 framework against with the tool?

547


What is html.renderpartial?

569


What is stateless model?

512


What is object service? : Entity framework

635


What are differences between entity framework and l2s? : Entity framework

651






Which approach provides better support for test driven development - asp.net mvc or asp.net webforms?

509


Is .net core replacing .net framework?

475


How can we determine action invoked from HTTP GET or HTTP POST?

568


What are the components required to create a route in ASP.Net MVC?

589


What is renderbody?

549


When using aspx view engine, to have a consistent look and feel, across all pages of the application, we can make use of asp.net master pages. What is asp.net master pages equivalent, when using razor views?

555


Does Tempdata hold the data for other request in ASP.Net MVC?

543


Is razor a server side?

529


How the ‘page lifecycle’ of ASP.Net MVC does works?

595


What is Differnce between html.action and ajax.action?

570