Wednesday, February 29, 2012
ASP.NET GridView ASCII and Numeric Sorting
.NET Interview Questions: - Show object pooling in .NET?
This is the most practical oriented .Net Interview Questions which may be asked during the Interview by the Interviewer.
COM+ reduces overhead by not creating object from scratch. So in COM+ when object is activated it’s activated, from pool and when it has deactivated it’s pushed back to the pool. Object pooling is configures by using the “ObjectPoolingAttribute” to the class.
Note:- When a class is marked with object pooling attribute it can not be inherited.
ObjectPooling(MinPoolSize := 2, MaxPoolSize := 5, CreationTimeout :=
20000)> _
Public Class testingclass
Inherits ServicedComponent
Public Sub DoWork()
' Method contents go here.
End Sub
End Class
Above is a sample code, which has the “Object Pooling” attribute defined. Below is a sample code, which uses the class.
Public Class App
Overloads Public Shared Sub Main(args() As String)
Dim xyz As New TestObjectPooling()
xyz.doWork()
ServicedComponent.DisposeObject (xyz)
End Sub
End Class
Above is a sample code, which uses the object pooled object. Note the Dispose Object () This ensures its safe return to the object pool.
View following video on regular expressions & some practical demonstrations in .Net Interview: -
Learn more on .NET interview questions
Regards,
From more on author’s blog related to .NET interview questions click and visit.
Could not find a part of the path ... bin\roslyn\csc.exe
I am trying to run an ASP.NET MVC (model-view-controller) project retrieved from TFS (Team Foundation Server) source control. I have added a...
-
Adding the New HTML Editor Extender to a Web Forms Application using NuGet : The July 2011 release of the Ajax Control Toolkit includes a ne...
-
Building your first Windows Metro style app using C#, C++, or Visual Basic [This documentation is preliminary and is subject to change.] ...
-
September 2011 Release of the Ajax Control Toolkit : I’m happy to announce the release of the September 2011 Ajax Control Toolkit. This rele...