Click here to Skip to main content
15,910,009 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help a noob C++ user with C# (union and bitfields) Pin
led mike6-Sep-06 6:37
led mike6-Sep-06 6:37 
GeneralRe: Help a noob C++ user with C# (union and bitfields) Pin
NYTSX6-Sep-06 7:44
NYTSX6-Sep-06 7:44 
GeneralRe: Help a noob C++ user with C# (union and bitfields) Pin
led mike6-Sep-06 9:29
led mike6-Sep-06 9:29 
QuestionUsing propertygrids Pin
Hampus@foi6-Sep-06 4:56
Hampus@foi6-Sep-06 4:56 
AnswerRe: Using propertygrids Pin
led mike6-Sep-06 6:50
led mike6-Sep-06 6:50 
GeneralRe: Using propertygrids Pin
Hampus@foi6-Sep-06 20:01
Hampus@foi6-Sep-06 20:01 
GeneralRe: Using propertygrids Pin
led mike7-Sep-06 4:44
led mike7-Sep-06 4:44 
GeneralCS0029: Cannot Implicitly Convert Type... Pin
code-frog6-Sep-06 4:47
professionalcode-frog6-Sep-06 4:47 
This is probably something simple for those in "the know" but I'm not
part of this exclusive group. Blush | :O So any help would be very appreciated.


Any idea why this code:
public override void LoadData()<br />
{<br />
    // Call base.LoadData()<br />
    base.LoadData();<br />
    if (!this.Page.IsPostBack) <br />
    {<br />
        ArrayList list;<br />
        if ((DataSource == null))<br />
        {<br />
            list = new ArrayList();<br />
        }<br />
        else<br />
        {<br />
            list = new ArrayList(this.DataSource);        <br />
<br />
        }<br />
        int i;<br />
        for (i = 0; i < 50; i++)<br />
        {<br />
            // To insert rows at the end of the table control<br />
            list.Add(new LineScheduleRecord());  <br />
<br />
            // To insert rows at the top of the table control<br />
            // list.Insert(i, new LineScheduleRecord());               <br />
        }                  <br />
        this.DataSource = (LineScheduleRecord[])(list.ToArray(typeof(LineScheduleRecord)));<br />
    }<br />
}


Would produce this error:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0029: Cannot implicitly convert type 'LINESCHEDULER.Business.LineScheduleRecord[]' to 'LINESCHEDULER.Business.LineScheduleAdminRecord[]'

Source Error:

Line 367: // list.Insert(i, new LineScheduleRecord());
Line 368: }
Line 369: this.DataSource = (LineScheduleRecord[])(list.ToArray(typeof(LineScheduleRecord)));
Line 370: }
Line 371:}



Check out my 7 Part Series on Networking[^]
Spyware Giving You Fits? Read My Latest Article.
[^]
Welcome to the CodeProject!- أهلاً بكم في كود بروجكت
- Καλώς ήλθες στο τόπο τωνκοδικων - സീപിയിലേക്കൂ സ്വാഗതം - コード·プロジェクトへようこそ - Добро пожаловатьна - كوڈ ڀراجيكٹ ميں خوش آمديد - ಸೀಪೀ" ಗೆ ಸ್ವಾಗತ

GeneralRe: CS0029: Cannot Implicitly Convert Type... Pin
g00fyman6-Sep-06 4:59
g00fyman6-Sep-06 4:59 
GeneralRe: CS0029: Cannot Implicitly Convert Type... Pin
S. Senthil Kumar6-Sep-06 6:17
S. Senthil Kumar6-Sep-06 6:17 
GeneralRe: CS0029: Cannot Implicitly Convert Type... Pin
code-frog6-Sep-06 12:29
professionalcode-frog6-Sep-06 12:29 
QuestionRunning .net application as both windows and console mode. [modified] Pin
mhadamji6-Sep-06 3:46
mhadamji6-Sep-06 3:46 
AnswerRe: Running .net application as both windows and console mode. Pin
mikone6-Sep-06 4:14
mikone6-Sep-06 4:14 
AnswerRe: Running .net application as both windows and console mode. Pin
Colin Angus Mackay6-Sep-06 4:21
Colin Angus Mackay6-Sep-06 4:21 
QuestionRe: Running .net application as both windows and console mode. Pin
Nader Elshehabi6-Sep-06 5:55
Nader Elshehabi6-Sep-06 5:55 
AnswerRe: Running .net application as both windows and console mode. Pin
Colin Angus Mackay7-Sep-06 9:36
Colin Angus Mackay7-Sep-06 9:36 
GeneralRe: Running .net application as both windows and console mode. Pin
mhadamji6-Sep-06 6:46
mhadamji6-Sep-06 6:46 
GeneralRe: Running .net application as both windows and console mode. Pin
Colin Angus Mackay7-Sep-06 9:37
Colin Angus Mackay7-Sep-06 9:37 
AnswerRe: Running .net application as both windows and console mode. Pin
mhadamji9-Sep-06 1:16
mhadamji9-Sep-06 1:16 
Questionhow can i find for a particular file in any logical drive Pin
Parshant Verma6-Sep-06 3:34
Parshant Verma6-Sep-06 3:34 
AnswerRe: how can i find for a particular file in any logical drive Pin
Niiiissssshhhhhuuuuu6-Sep-06 4:03
Niiiissssshhhhhuuuuu6-Sep-06 4:03 
AnswerRe: how can i find for a particular file in any logical drive Pin
mikone6-Sep-06 4:07
mikone6-Sep-06 4:07 
AnswerRe: how can i find for a particular file in any logical drive Pin
Utkarshraj Atmaram6-Sep-06 4:08
Utkarshraj Atmaram6-Sep-06 4:08 
Questioninterop: char* to what? ref string? [modified] Pin
Utkarshraj Atmaram6-Sep-06 3:31
Utkarshraj Atmaram6-Sep-06 3:31 
AnswerRe: interop: char* to what? ref string? Pin
mikone6-Sep-06 4:13
mikone6-Sep-06 4:13 

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.