Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Is it possible to create a new type?

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 04-10-2008   #1 (permalink)
RickB
Guest


 

Is it possible to create a new type?

I'd like to attach a PSScriptMethod called GetType to a PSObject.
I'm thinking if my synthetic objects have unique types my code
can deal with them like other types using -is, -isnot etc.
But I can't just return a string with the type name from GetType.
It wants an object of type [system.type] returned.
Is it possible to create such an object that '-is' a specific name of
my choosing?

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Unable to cast COM object of type 'ADODB.RecordsetClass' to class type 'System.Object[]' Michel Posseth [MCP] .NET General 2 03-27-2008 10:04 AM
Display actual file type, not description of the type Doug Vista file management 3 10-12-2007 01:40 AM
Display the actual type, rather than the description of the type Doug Vista General 4 10-11-2007 10:42 AM
Unable to find type [Drawing.Image]: make sure that the assembly containing this type is loaded IT Staff PowerShell 4 08-16-2007 08:55 PM


Update your Vista Drivers Update Your Drivers Now!!

Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008