Click here to Skip to main content
15,920,633 members
Home / Discussions / C#
   

C#

 
GeneralRe: Looking for feedback and contributions to database project Pin
Michael Sydney Balloni24-Oct-21 13:59
professionalMichael Sydney Balloni24-Oct-21 13:59 
GeneralRe: Looking for feedback and contributions to database project Pin
BillWoodruff24-Oct-21 23:02
professionalBillWoodruff24-Oct-21 23:02 
GeneralRe: Looking for feedback and contributions to database project Pin
jschell23-Dec-21 5:34
jschell23-Dec-21 5:34 
GeneralRe: Looking for feedback and contributions to database project Pin
Michael Sydney Balloni23-Dec-21 11:21
professionalMichael Sydney Balloni23-Dec-21 11:21 
QuestionHow to get Millions of files from folder and bulk insert in database Pin
Ankur B. Patel16-Oct-21 1:10
Ankur B. Patel16-Oct-21 1:10 
AnswerRe: How to get Millions of files from folder and bulk insert in database Pin
Eddy Vluggen16-Oct-21 3:10
professionalEddy Vluggen16-Oct-21 3:10 
GeneralRe: How to get Millions of files from folder and bulk insert in database Pin
Richard MacCutchan16-Oct-21 4:00
mveRichard MacCutchan16-Oct-21 4:00 
GeneralRe: How to get Millions of files from folder and bulk insert in database Pin
Eddy Vluggen16-Oct-21 4:18
professionalEddy Vluggen16-Oct-21 4:18 
GeneralRe: How to get Millions of files from folder and bulk insert in database Pin
Ankur B. Patel16-Oct-21 4:59
Ankur B. Patel16-Oct-21 4:59 
GeneralRe: How to get Millions of files from folder and bulk insert in database Pin
Gerry Schmitz16-Oct-21 11:04
mveGerry Schmitz16-Oct-21 11:04 
AnswerRe: How to get Millions of files from folder and bulk insert in database Pin
OriginalGriff16-Oct-21 6:43
mveOriginalGriff16-Oct-21 6:43 
AnswerRe: How to get Millions of files from folder and bulk insert in database Pin
Michael Sydney Balloni16-Oct-21 17:36
professionalMichael Sydney Balloni16-Oct-21 17:36 
AnswerRe: How to get Millions of files from folder and bulk insert in database Pin
jschell24-Oct-21 6:50
jschell24-Oct-21 6:50 
QuestionPredicateBuilder Question Pin
Kevin Marois15-Oct-21 5:24
professionalKevin Marois15-Oct-21 5:24 
AnswerRe: PredicateBuilder Question Pin
Eddy Vluggen15-Oct-21 14:44
professionalEddy Vluggen15-Oct-21 14:44 
QuestionTask.WhenAll ConfigureAwait Question Pin
Kevin Marois14-Oct-21 12:57
professionalKevin Marois14-Oct-21 12:57 
AnswerRe: Task.WhenAll ConfigureAwait Question Pin
Richard Deeming14-Oct-21 23:15
mveRichard Deeming14-Oct-21 23:15 
GeneralRe: Task.WhenAll ConfigureAwait Question Pin
Kevin Marois15-Oct-21 4:53
professionalKevin Marois15-Oct-21 4:53 
GeneralRe: Task.WhenAll ConfigureAwait Question Pin
Richard Deeming15-Oct-21 5:59
mveRichard Deeming15-Oct-21 5:59 
GeneralRe: Task.WhenAll ConfigureAwait Question Pin
Kevin Marois15-Oct-21 6:29
professionalKevin Marois15-Oct-21 6:29 
GeneralRe: Task.WhenAll ConfigureAwait Question Pin
Kevin Marois15-Oct-21 8:08
professionalKevin Marois15-Oct-21 8:08 
GeneralRe: Task.WhenAll ConfigureAwait Question Pin
Richard Deeming17-Oct-21 21:58
mveRichard Deeming17-Oct-21 21:58 
GeneralRe: Task.WhenAll ConfigureAwait Question Pin
Kevin Marois18-Oct-21 4:01
professionalKevin Marois18-Oct-21 4:01 
QuestionCodility fails to compile even though it compiles in VS code? Pin
Cliff ludo13-Oct-21 6:41
Cliff ludo13-Oct-21 6:41 
I have the following code which runs on VS code but not when I try to compile on codility:
C#
using System;
//using System.Linq;

static class Solution {
static int solution( int[] A ) {

    int flag = 1;
    //A = A.OrderBy(x => x).ToArray();
    Array.Sort(A);

        for (int i = 0; i < A.Length; i++)
        {
            if (A[i] <= 0)
            continue;
        else if (A[i] == flag)
        {
            flag++;
        }
    }
    return flag;
    }
    
    static void Main(string[] args) {
        
    int[] A = { 1, 3, 6, 4, 1, 2 }; 
    //int [] A ={1, 2, 3};
    //int [] A ={-1,-3};

        //var Val = A.Max();
       // if (Val < 1000000) {
        if(A.Length<99999)
        {
        int miss = solution(A);
        Console.Write(miss);       
        }
        else
        {
        Console.WriteLine(" Array is too large! ");
        }
        //}
        //else {
           // Console.WriteLine("Array Values are too big!");
        }
    }


The error I get is :

Compiler output:
Compilation failed: 2 error(s), 0 warnings
exec.cs(18,24): error CS0017: Program `exec.exe' has more than one entry point defined: `SolutionWrapper.Main(string[])'
Solution.cs(23,17): error CS0017: Program `exec.exe' has more than one entry point defined: `Solution.Main(string[])'


Runs just fine in VS code but not on codility, anyone know why?

modified 13-Oct-21 16:02pm.

AnswerRe: Codility fails to compile even though it compiles in VS code? Pin
BillWoodruff13-Oct-21 17:11
professionalBillWoodruff13-Oct-21 17:11 

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.