Click here to Skip to main content
15,891,184 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: asp.net ValidatorCalloutExtender unhandled exception error Pin
Richard MacCutchan20-Aug-14 3:40
mveRichard MacCutchan20-Aug-14 3:40 
GeneralRe: asp.net ValidatorCalloutExtender unhandled exception error Pin
murali_utr20-Aug-14 4:19
murali_utr20-Aug-14 4:19 
Questiondisappearing cookies Pin
Ali Al Omairi(Abu AlHassan)18-Aug-14 2:13
professionalAli Al Omairi(Abu AlHassan)18-Aug-14 2:13 
SuggestionRe: disappearing cookies Pin
ZurdoDev18-Aug-14 8:33
professionalZurdoDev18-Aug-14 8:33 
GeneralRe: disappearing cookies Pin
Ali Al Omairi(Abu AlHassan)18-Aug-14 21:01
professionalAli Al Omairi(Abu AlHassan)18-Aug-14 21:01 
QuestionCompare 2 tables Pin
byka18-Aug-14 1:56
byka18-Aug-14 1:56 
QuestionRe: Compare 2 tables Pin
ZurdoDev18-Aug-14 8:32
professionalZurdoDev18-Aug-14 8:32 
AnswerRe: Compare 2 tables Pin
Andy_L_J28-Aug-14 0:38
Andy_L_J28-Aug-14 0:38 
try

C#
class Program
  {
    
    static void CompareList<T>(List<T> a, List<T> b, ref List<T> diff)
    {
      foreach(T item in a)
      {
        if(!b.Contains(item))
        {
          if(diff.Count == 0)
          {
            diff.Add(item);
          }
          else if(!diff.Contains(item))
          {
            diff.Add(item);
          }
        }
      }
    }

    /// <summary>
    /// Compare Two Lists of primitive types and return sorted list
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <param name="a">The first list to compare</param>
    /// <param name="b">The second list to compare</param>
    /// <param name="diff">the ref param that returns the sorted list of items not in both lists</param>
    static void ListDifference<T>(List<T> a, List<T> b, ref List<T> diff)
    {
      CompareList(a,b,ref diff);
      CompareList(b,a,ref diff);
      diff.Sort();
    }

    static void Main(string[] args)
    {

      List<int> a = new List<int>{1,2,3,4,5,6,7};
      List<int> b = new List<int>{4,6,7,8,9,10};
      List<int> diff = new List<int>();

      List<string> c = new List<string>{"a", "b", "c", "d","e", "f", "t", "U"};
      List<string> d = new List<string>{"b","e","f","g","h"};
      //List<string> d = new List<string>();
      List<string> diff2 = new List<string>();

      ListDifference(a,b, ref diff);
      ListDifference(c, d, ref diff2);

      Console.WriteLine("-- Result of CompareLists for Int");
      foreach(int i in diff)
      {
        Console.WriteLine(i.ToString());
      }
      Console.WriteLine();
      Console.WriteLine("Results for CompareLists for strings");
      foreach(string s in diff2)
      {
        Console.WriteLine(s);
      }

      Console.Read();
    }
  }

I don't speak Idiot - please talk slowly and clearly

"I have sexdaily. I mean dyslexia. Fcuk!"

Driven to the arms of Heineken by the wife

QuestionDownloading multiple pdf files in a Zip is not working Pin
Member 1048246516-Aug-14 2:19
Member 1048246516-Aug-14 2:19 
AnswerRe: Downloading multiple pdf files in a Zip is not working Pin
Afzaal Ahmad Zeeshan17-Aug-14 2:43
professionalAfzaal Ahmad Zeeshan17-Aug-14 2:43 
GeneralRe: Downloading multiple pdf files in a Zip is not working Pin
Member 1048246518-Aug-14 2:36
Member 1048246518-Aug-14 2:36 
GeneralRe: Downloading multiple pdf files in a Zip is not working Pin
Member 1048246518-Aug-14 2:45
Member 1048246518-Aug-14 2:45 
Questionscrape table from web page Pin
Mahmoud198716-Aug-14 1:41
Mahmoud198716-Aug-14 1:41 
QuestionSyntax error near INSERT INTO Pin
Otekpo Emmanuel15-Aug-14 23:05
Otekpo Emmanuel15-Aug-14 23:05 
AnswerRe: Syntax error near INSERT INTO Pin
Wombaticus15-Aug-14 23:21
Wombaticus15-Aug-14 23:21 
GeneralSolved: Syntax error near INSERT INTO Pin
Otekpo Emmanuel16-Aug-14 3:17
Otekpo Emmanuel16-Aug-14 3:17 
AnswerRe: Syntax error near INSERT INTO Pin
Sibeesh KV29-Sep-14 1:34
professionalSibeesh KV29-Sep-14 1:34 
QuestionHow to avoid duplicate data insertion in.net???? Pin
Member 1086700215-Aug-14 22:06
Member 1086700215-Aug-14 22:06 
AnswerRe: How to avoid duplicate data insertion in.net???? Pin
Afzaal Ahmad Zeeshan17-Aug-14 2:48
professionalAfzaal Ahmad Zeeshan17-Aug-14 2:48 
AnswerRe: How to avoid duplicate data insertion in.net???? Pin
NishantRaval27-Aug-14 23:32
NishantRaval27-Aug-14 23:32 
AnswerRe: How to avoid duplicate data insertion in.net???? Pin
Sibeesh KV29-Sep-14 1:36
professionalSibeesh KV29-Sep-14 1:36 
Questionhow to enable false of iframe page in asp.net not display false by jquery and css? Pin
kp 77715-Aug-14 4:54
professionalkp 77715-Aug-14 4:54 
AnswerRe: how to enable false of iframe page in asp.net not display false by jquery and css? Pin
ZurdoDev15-Aug-14 5:28
professionalZurdoDev15-Aug-14 5:28 
QuestionRequiredfield validator is not working Pin
murali_utr14-Aug-14 18:47
murali_utr14-Aug-14 18:47 
AnswerRe: Requiredfield validator is not working Pin
ZurdoDev15-Aug-14 5:29
professionalZurdoDev15-Aug-14 5:29 

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.