Click here to Skip to main content
15,895,656 members
Home / Discussions / C#
   

C#

 
AnswerRe: Public Enum in UserControl is crashing Visual Studio 2008 Pin
Not Active7-Apr-10 15:32
mentorNot Active7-Apr-10 15:32 
GeneralRe: Public Enum in UserControl is crashing Visual Studio 2008 Pin
Corayzon7-Apr-10 15:47
Corayzon7-Apr-10 15:47 
AnswerRe: Public Enum in UserControl is crashing Visual Studio 2008 Pin
DaveyM697-Apr-10 16:03
professionalDaveyM697-Apr-10 16:03 
GeneralRe: Public Enum in UserControl is crashing Visual Studio 2008 Pin
Corayzon7-Apr-10 16:30
Corayzon7-Apr-10 16:30 
GeneralRe: Public Enum in UserControl is crashing Visual Studio 2008 Pin
DaveyM697-Apr-10 16:34
professionalDaveyM697-Apr-10 16:34 
QuestionMessage Removed Pin
7-Apr-10 15:06
arucied7-Apr-10 15:06 
AnswerRe: How to jion points into a smoothing curve in WPF Pin
AspDotNetDev7-Apr-10 15:55
protectorAspDotNetDev7-Apr-10 15:55 
Questionaccess data base Pin
adrian5647-Apr-10 10:11
adrian5647-Apr-10 10:11 
Hello all,

I'm new to c# and I'm having trouble accessing a custom built .dll that is referenced from my Microsoft visual studio 2010 c# console project.
The CaraPartnersSdk.dll has 2 files from what I can see. which are:

using System;
using System.Collections.Generic;

namespace CaraPartnersSdk
{
    public class CarCollection
    {
        public CarCollection();

        public IEnumerable<Car> FindByName(string name);
        public Car GetByID(int id);
    }
}


I know this class some how will help me access the collection of cars. I need help parsing through this collection so I can retrieve an individual car. I have no idea how. Please, excuse my dumb question I know its pretty dumb but I have spent a long time trying to figure this out but I can not.

This is the other class "Car":
using System;
using System.Collections.Generic;

namespace CaraPartnersSdk
{
    public class Car
    {
        public Car();

        public string AlternateForm { get; }
        public Condition Condition { get; }
        public IEnumerable<Car> ConnectsToCar { get; }
        public bool HasBeenOpened { get; }
        public int ID { get; }
        public string Name { get; }
        public string OptionalAttributesXml { get; }
        public decimal Price { get; }
        public string Set { get; }
        public int Strength { get; }
    }
}


For now, I just want to print out all the car names from the collection of cars. I would just like to do it in a simple main class but I've had great difficulty in doing so. Any help is much appreciated. Thank you.

Best,
Adrian
AnswerRe: access data base Pin
PIEBALDconsult7-Apr-10 10:38
mvePIEBALDconsult7-Apr-10 10:38 
GeneralRe: access data base Pin
adrian5647-Apr-10 11:44
adrian5647-Apr-10 11:44 
GeneralRe: access data base Pin
PIEBALDconsult7-Apr-10 13:25
mvePIEBALDconsult7-Apr-10 13:25 
GeneralRe: access data base Pin
adrian5647-Apr-10 13:37
adrian5647-Apr-10 13:37 
GeneralRe: access data base Pin
PIEBALDconsult7-Apr-10 13:50
mvePIEBALDconsult7-Apr-10 13:50 
GeneralRe: access data base Pin
Not Active7-Apr-10 15:29
mentorNot Active7-Apr-10 15:29 
GeneralRe: access data base Pin
adrian5647-Apr-10 16:23
adrian5647-Apr-10 16:23 
GeneralRe: access data base Pin
PIEBALDconsult7-Apr-10 17:26
mvePIEBALDconsult7-Apr-10 17:26 
GeneralRe: access data base Pin
PIEBALDconsult7-Apr-10 17:23
mvePIEBALDconsult7-Apr-10 17:23 
GeneralRe: access data base Pin
Not Active8-Apr-10 1:37
mentorNot Active8-Apr-10 1:37 
Questionhow to load data from a xml file to sqlserver table? Pin
babak dev7-Apr-10 9:12
babak dev7-Apr-10 9:12 
AnswerRe: how to load data from a xml file to sqlserver table? Pin
OriginalGriff7-Apr-10 9:14
mveOriginalGriff7-Apr-10 9:14 
GeneralRe: how to load data from a xml file to sqlserver table? Pin
babak dev7-Apr-10 9:40
babak dev7-Apr-10 9:40 
GeneralRe: how to load data from a xml file to sqlserver table? Pin
Not Active7-Apr-10 10:07
mentorNot Active7-Apr-10 10:07 
GeneralRe: how to load data from a xml file to sqlserver table? Pin
babak dev7-Apr-10 19:59
babak dev7-Apr-10 19:59 
QuestionActivator.CreateInstance error [modified] Pin
Fayu7-Apr-10 9:00
Fayu7-Apr-10 9:00 
AnswerRe: Activator.CreateInstance error Pin
Fayu7-Apr-10 9:09
Fayu7-Apr-10 9:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.