| |

VerySource

 Forgot password?
 Register
Search
View: 679|Reply: 1

A strange problem with IEnumElement, online etc.

[Copy link]

2

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-8 09:00:02
| Show all posts |Read mode
The following code works perfectly:

IEnumElement pEnumElement;
   IElement pEle;
   pEnumElement = pGrphContainer.LocateElements (pPt, dist) as IEnumElement;
   // the below always null
   if (pEnumElement! = null)

But pEnumElement is always null! I changed the parameter dist to 1000 and it is still null!

All parameters are data. It should be said that no problems will occur!

What the hell is going on? ?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-4 16:45:01
| Show all posts
Don't use this judgment, use pEnumElement.Next, try it, or just don't execute it when debugging, see if there is a value in this local variable, and take a closer look. I have never used this thing, nor am I a master, not necessarily correct, haha
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list