Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 C++/CLI: GetType() and typeid
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jorgito11
Senior Member

USA
29 Posts

Posted - Feb 22 2006 :  7:58:50 PM  Show Profile  Reply with Quote
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Standard

VA_X.dll file version 10.2.1440.0 built 2006.01.17

Visual C++/CLI

Visual Assist X does not seem to recognize "GetType()" and "typeid"

public ref struct Record
{
String ^ name;
int age;
};

...
Type ^ type1 = Record::typeid; // red underline (no intellisense)

Record ^ rec = gcnew Record;
Type ^ type2 = rec->GetType(); // red underline
...



Edited by - jorgito11 on Feb 22 2006 8:00:40 PM

jpizzi
Tomato Guru

USA
642 Posts

Posted - Feb 22 2006 :  8:19:14 PM  Show Profile  Reply with Quote
That is C#, isn't it? The ^ in C++ is the bitwise OR.

Joe Pizzi
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Feb 23 2006 :  3:30:46 PM  Show Profile  Reply with Quote
jpizzi this is managed C++ syntax. CLI is its new name in VS2005, i know that much, but that is about where my knowledge of this ends.

case=998

interestingly enough, with VA disabled the IDE its self will not suggest typeid after the struct name, at least it will not for me.

zen is the art of being at one with the two'ness
Go to Top of Page

jorgito11
Senior Member

USA
29 Posts

Posted - Feb 23 2006 :  8:32:00 PM  Show Profile  Reply with Quote
You are right! It does not show up when VAX is disabled. However, it does turn blue.
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Feb 24 2006 :  03:07:29 AM  Show Profile  Reply with Quote
quote:
jpizzi this is managed C++ syntax.
Yet another reason to stay away from managed C++

Joe Pizzi
Go to Top of Page

jorgito11
Senior Member

USA
29 Posts

Posted - Feb 24 2006 :  6:41:55 PM  Show Profile  Reply with Quote
Come on, now! Let's not get started!

I have a lot of native C code to work with! C++/CLI is a better tool to work with this code.

Edited by - jorgito11 on Feb 24 2006 6:44:05 PM
Go to Top of Page

jorgito11
Senior Member

USA
29 Posts

Posted - Feb 24 2006 :  8:55:00 PM  Show Profile  Reply with Quote
It appears "static" methods or properties on types get the red underline:

__int64::MinValue
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Feb 25 2006 :  01:40:48 AM  Show Profile  Reply with Quote
quote:
I have a lot of native C code to work with! C++/CLI is a better tool to work with this code.
Managed C++ is better to work in than native C++?

Please, do tell how that is. Maybe I can learn something about managed C++.

Joe Pizzi
Go to Top of Page

jorgito11
Senior Member

USA
29 Posts

Posted - Feb 25 2006 :  11:38:34 AM  Show Profile  Reply with Quote
Native C++ is great, and I have written a lot of code using ATL, STL, WTL, MFC, Boost library and Win32. C++/CLI (or Managed C++) is just another nice tool that integrates legacy code with Managed code without a lot of effort. I needed to access an entity-relation database via the web and C++/CLI cut development time. I still need to know C# to create ASP.NET applications; however,the helper assemblies were created in C++/CLI.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Feb 26 2006 :  09:40:47 AM  Show Profile  Reply with Quote
quote:
Originally posted by jorgito11

It appears "static" methods or properties on types get the red underline:

__int64::MinValue



i am seeing the same thing.

case=1007


as for the whole question of managed C++, i do not know enough about the language to have an informed opinion. however what i have seen seems rather "complicated", since mixing garbage collected memory allocation with normal memory allocation, plus the new types, all seems like quite a lot to juggle. certainly it tends to result in code snippets that look very strange.

then again, this could simply be because i am not familiar with it *shrug*

zen is the art of being at one with the two'ness
Go to Top of Page

jorgito11
Senior Member

USA
29 Posts

Posted - Feb 26 2006 :  5:58:39 PM  Show Profile  Reply with Quote
Generally, C# is a cleaner looking language than C++/cLI. However, C++/CLI appears more C++ like than the old 1.1 Managed C++. Anyway, C++/CLI is not for everyone. There is much more learning resources available for C# and VB than C++/CLI. Since I have used C++ for years, C++/CLI seems quite natural to me.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000