Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 27th, 2004, 11:39 PM
Registered User
 
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to nagendrakumar_b
Default How a MustNotInheritable Class responds?

Hi,
I am using a MustNotInheritable class in vb.net with a Private constructer, for restricting new instances, which can be used directly without declaration. In this class we have both public and private shared methods, which contains local variables inside the methods. This methods used for fetching, updating the data using datasets, dataviews, command objects & parameters for calling procedures in the database. So when more than one user calls the same method declared as public shared, what actually happens internally?

i. Whether object implements thread safety, which automatically synchronize the calls of the multi-users.
ii. Whether the class takes cares only single call, without caring other calls?, means working like a single threaded component.
iii. Whether the class automatically create instance for the each users.

Or any another answer for this.

Please kindly let me know clearly what actually happens and how the threads behave




 
Old May 3rd, 2004, 02:58 AM
Registered User
 
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to nagendrakumar_b
Default

Hi friends,
I had posted my query long back but i didn't got response to it. Now i have the solution for it and i got it from one of my friend. But i saw people read my post. So it would nice if i share my answer with everyone. Thanks for the persons who read my previous post.

****************
actually the thing here is MustnotInheritable/sealed class with private constructors are not targetted to
implement
directly in side the application without any transaction control. It
may be
included in Business Logic Layer or SQLTransaction object. For example this
component can be used with COM+ transactions. when we come across any situation to use this component for transactions,
it is better to use in conjunction with the Transaction model of ADo.net or COM+. Regarding thread safe, by default the components created by .NET are thread safe. Even more than user calls the same method, shared method inside using local variables. It creates new memory locatios for that. So any way it doesn't create any impact on application.

thanks...

**************
Do Reply if your problem solves with solution. It helps everyone who checks the post to find and get the right solution.

Nag





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using logging class as a static class punitw General .NET 0 August 14th, 2008 03:03 AM
Webpart that responds to client side events millerthegorilla SharePoint Development 1 June 18th, 2008 07:50 AM
Property access from Class within Partial Class zoltac007 C# 2005 0 December 1st, 2006 01:01 AM
Regarding Class Library (.dll) from class file manish.sharma04 BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 March 3rd, 2006 07:32 AM
How to include c# class and vb class in the .vbprj umeshayk VS.NET 2002/2003 2 January 9th, 2004 12:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.