Home > Net >  Of the secondary development of SolidWorks about c # small question want to ask next everybody bosse
Of the secondary development of SolidWorks about c # small question want to ask next everybody bosse

Time:09-15

Of the secondary development of SolidWorks about c # small question want to ask next everybody bosses, for c # language is just started to learn,,,,
 ModelDoc2 swModel; 
ModelDocExtension swExt;
SelectionMgr swSelMgr;
Bool boolstatus;
String y;
Double r1.
Double r2;
Bool rad.
Double ang;
Double xOff;
Double yOff;
Bool LockStart;
Bool LockEnd;

Public void Main ()
{
SwModel=(ModelDoc2) swApp. ActiveDoc;

Very curious swApp ActiveDoc is an attribute which is how to cast ModelDoc2 class that let I good confusion

CodePudding user response:

Either ActiveDoc is object type, or both have inheritance relationship

CodePudding user response:

What the two related knowledge? Say please? I'll get to learn, if it really is removed (ModeDoc2) can prompt the object classes can't implicitly converts ModeDoc2

CodePudding user response:

https://docs.microsoft.com/zh-cn/dotnet/api/system.object? View=netcore - 3.1
  •  Tags:  
  • C#
  • Related