Hi,
I'm using ASP.NET 2.0 and have to implement a queue object. That's no
problem - its just:
Queue myQueue<object> = new Queue<object>();
The thing is though - I want to make this queue available through a
wrapper class (so its available to everything) but I dont know how to
do this. can you assist? You know i want to use getters and setters or
is this applicable? Any comments/suggestions/help/code-sampels much
appreciated.
Thank you,
Al.
Peter Ritchie [C# MVP] - 25 Mar 2008 16:01 GMT
Why do you want a wrapper class? Why not simply expose a Queue<object>
property/member?

Signature
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
> Hi,
>
[quoted text clipped - 8 lines]
> is this applicable? Any comments/suggestions/help/code-sampels much
> appreciated.
sloan - 26 Mar 2008 15:16 GMT
I think its the simple setup below.
Am I missing something?
Do you want "object" to be a Generic?
public class MyWrapper
{
private Queue _myQueue<object> = new Queue<object>();
public Queue TheQueue//bad naming convention here
{
get { return _myQueue; }
set { _myQueue= value; }
}
}
//
MyWrapper w = new MyWrapper();
w.TheQueue.Dequeue(); //?? whatever the methods are
> Hi,
>
[quoted text clipped - 11 lines]
> Thank you,
> Al.
Ignacio Machin ( .NET/ C# MVP ) - 26 Mar 2008 16:14 GMT
On Mar 25, 7:51 am, "almu...@altavista.com" <almu...@altavista.com>
wrote:
> Hi,
>
[quoted text clipped - 11 lines]
> Thank you,
> Al.
Hi,
Are you refering to a singleton?
Take a look at Jon's Skeet article about how to best implement a
singleton