Question: How do you get the first item only? It seems like I have to do the following otherwise i will get an error as if it was a multiple item and i can't get just the first element of it. 

My goal is i would like to remove the foreach loop from the code below.

```
                        MetaDataPropertyBag propertyBag = new MetaDataPropertyBag();

                        var dbResultsOfType = db.spi_GetTypesByCaseType(caseType);

                        foreach (var item in dbResultsOfType)
                        {
                            if (item.ASSOC_TYPE_ID == primaryChildTypeID)
                            {
                                propertyBag.CaseTypeDesc = item.DESCRIPTION;
                                propertyBag.Required = item.IS_REQUIRED == 'Y' ? true : false;
                                propertyBag.Parent = item.PARENT_ID.Value;
                                propertyBag.Child = item.CHILD_ID.Value;
                                propertyBag.AssocTypeID = item.ASSOC_TYPE_ID;
                                propertyBag.CaseTypeID = item.CASE_TYPE_ID;
                                break; // Only one entry is requested
                            }
                        }

```

Answer: 
```
*data_pt = myclass.myclass(size);

```

should not compile.

Use a standard library collection class such as `std::vector` to hold your data.
Please use some sane C++ STL collection to hold the data such as a `list`, `map`, or `deque`. Don't try to fake it somehow, it's just not worth it.