Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
Questiona little problem with MenuItem, Pin
vedmack24-Aug-06 5:23
vedmack24-Aug-06 5:23 
AnswerRe: a little problem with MenuItem, Pin
MoustafaS24-Aug-06 6:26
MoustafaS24-Aug-06 6:26 
GeneralRe: a little problem with MenuItem, Pin
vedmack24-Aug-06 20:34
vedmack24-Aug-06 20:34 
QuestionC#.net with system process Pin
xiaowenjie24-Aug-06 5:17
xiaowenjie24-Aug-06 5:17 
AnswerRe: C#.net with system process Pin
Judah Gabriel Himango24-Aug-06 5:41
sponsorJudah Gabriel Himango24-Aug-06 5:41 
GeneralRe: C#.net with system process Pin
thunderbirdje24-Aug-06 6:30
thunderbirdje24-Aug-06 6:30 
Questionone to many class association Pin
chacimulch24-Aug-06 4:57
chacimulch24-Aug-06 4:57 
AnswerRe: one to many class association Pin
beatles169224-Aug-06 5:26
beatles169224-Aug-06 5:26 
hi,
You can add a method to your Order class called AddProduct as follows:
<br />
class Order<br />
{<br />
.<br />
.<br />
.<br />
public void AddProduct(Product product)<br />
{<br />
ArrayList products=new ArrayList(this.productField);<br />
products.Add(product);<br />
this.productField=(Product[])products.ToArray(typeof(Product));<br />
}<br />
}<br />

Since you are storing products in an array you can not add an item to it, therefor you should use an ArrayList to add an item to the array and to cast it to the array again

Regards
Questionnot working still. Re: one to many class association [modified] Pin
chacimulch24-Aug-06 8:43
chacimulch24-Aug-06 8:43 
AnswerRe: not working still. Re: one to many class association Pin
beatles169224-Aug-06 21:05
beatles169224-Aug-06 21:05 
QuestionHelp with syntax. Re: one to many class association Pin
chacimulch25-Aug-06 2:36
chacimulch25-Aug-06 2:36 
AnswerRe: Help with syntax. Re: one to many class association Pin
beatles169225-Aug-06 3:03
beatles169225-Aug-06 3:03 
QuestionRe: Help with syntax. Re: one to many class association [modified] Pin
chacimulch25-Aug-06 3:51
chacimulch25-Aug-06 3:51 
AnswerRe: Help with syntax. Re: one to many class association Pin
beatles169225-Aug-06 12:10
beatles169225-Aug-06 12:10 
AnswerRe: one to many class association Pin
Nader Elshehabi24-Aug-06 10:51
Nader Elshehabi24-Aug-06 10:51 
Questionusing Sission by c# Pin
mhattiyah24-Aug-06 4:46
mhattiyah24-Aug-06 4:46 
AnswerRe: using Sission by c# Pin
ToddHileHoffer24-Aug-06 5:10
ToddHileHoffer24-Aug-06 5:10 
Questioninconsistency in virtual dir Pin
Kunal P24-Aug-06 4:31
Kunal P24-Aug-06 4:31 
AnswerRe: inconsistency in virtual dir Pin
Ennis Ray Lynch, Jr.24-Aug-06 9:15
Ennis Ray Lynch, Jr.24-Aug-06 9:15 
GeneralRe: inconsistency in virtual dir Pin
Kunal P24-Aug-06 20:03
Kunal P24-Aug-06 20:03 
GeneralRe: inconsistency in virtual dir Pin
Guffa24-Aug-06 22:42
Guffa24-Aug-06 22:42 
QuestionDoh! Regular Expressions and C# Strings [modified] Pin
Brent Lamborn24-Aug-06 4:24
Brent Lamborn24-Aug-06 4:24 
AnswerRe: Doh! Regular Expressions and C# Strings Pin
Coding C#24-Aug-06 4:38
Coding C#24-Aug-06 4:38 
GeneralRe: Doh! Regular Expressions and C# Strings Pin
User 665824-Aug-06 5:31
User 665824-Aug-06 5:31 
AnswerRe: Doh! Regular Expressions and C# Strings Pin
coolestCoder24-Aug-06 4:42
coolestCoder24-Aug-06 4:42 

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.