Click here to Skip to main content
15,905,028 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionSimulation in c# Pin
Sareh khanoom15-Oct-08 5:59
Sareh khanoom15-Oct-08 5:59 
AnswerRe: Simulation in c# Pin
Dave Kreskowiak15-Oct-08 7:08
mveDave Kreskowiak15-Oct-08 7:08 
QuestionDataTable PrimaryKey problem Pin
calhuskerfan14-Oct-08 11:54
calhuskerfan14-Oct-08 11:54 
AnswerRe: DataTable PrimaryKey problem Pin
led mike15-Oct-08 5:01
led mike15-Oct-08 5:01 
GeneralRe: DataTable PrimaryKey problem Pin
calhuskerfan15-Oct-08 9:17
calhuskerfan15-Oct-08 9:17 
QuestionRe: DataTable PrimaryKey problem Pin
led mike15-Oct-08 9:58
led mike15-Oct-08 9:58 
AnswerRe: DataTable PrimaryKey problem Pin
calhuskerfan15-Oct-08 10:03
calhuskerfan15-Oct-08 10:03 
AnswerRe: DataTable PrimaryKey problem Pin
calhuskerfan15-Oct-08 10:17
calhuskerfan15-Oct-08 10:17 
Here is a very quick (and sloppy) example that reproduces the behavior.

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Data;


namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            Test1();
        }

        public static void Test1()
        {
            DataTable dt1 = new DataTable();
            //
            dt1.Columns.Add("col0");
            dt1.Columns.Add("col1");
            dt1.Columns.Add("col2");
            //
            dt1.Columns[0].DataType = typeof(Int32);
            dt1.Columns[1].DataType = typeof(String);
            dt1.Columns[2].DataType = typeof(String);
            //
            DataRow dr = dt1.NewRow();
            dr["col0"] = 1;
            dr["col1"] = "Column 2";
            dr["col2"] = "Column 3";
            dt1.Rows.Add(dr);
            //
            dr = dt1.NewRow();
            dr["col0"] = 1;
            dr["col1"] = "Column 2";
            dr["col2"] = "Column 3   ";
            dt1.Rows.Add(dr);
            //
            try
            {
                dt1.PrimaryKey = new DataColumn[] { dt1.Columns[0], dt1.Columns[2] };
            }
            catch (ArgumentException ae)
            {
                MessageBox.Show(ae.Message);
            }
        }
    }
}

GeneralRe: DataTable PrimaryKey problem Pin
led mike15-Oct-08 10:49
led mike15-Oct-08 10:49 
GeneralRe: DataTable PrimaryKey problem Pin
Wendelius15-Oct-08 11:18
mentorWendelius15-Oct-08 11:18 
QuestionVisual c++ runtime error on only framework installed machine Pin
balu1234514-Oct-08 7:19
balu1234514-Oct-08 7:19 
Answer[Cross Post]Re: Visual c++ runtime error on only framework installed machine [modified] Pin
Scott Dorman14-Oct-08 8:27
professionalScott Dorman14-Oct-08 8:27 
GeneralRe: [Cross Post]Re: Visual c++ runtime error on only framework installed machine Pin
Mark Salsbery14-Oct-08 8:32
Mark Salsbery14-Oct-08 8:32 
GeneralRe: [Cross Post]Re: Visual c++ runtime error on only framework installed machine Pin
Scott Dorman14-Oct-08 8:38
professionalScott Dorman14-Oct-08 8:38 
QuestionDifferent exception handling behavior with and without debugger attached Pin
jpsstavares14-Oct-08 5:37
jpsstavares14-Oct-08 5:37 
QuestionRe: Different exception handling behavior with and without debugger attached Pin
jpsstavares14-Oct-08 23:40
jpsstavares14-Oct-08 23:40 
Question[Content_Types].xml in System.IO.Packaging.ZipPackage Pin
Chapooki14-Oct-08 3:59
Chapooki14-Oct-08 3:59 
AnswerRe: [Content_Types].xml in System.IO.Packaging.ZipPackage Pin
ramanakanthkv20-Oct-10 1:41
ramanakanthkv20-Oct-10 1:41 
QuestionCan windows search api be used for searching sql database? Pin
shraddhapingale14-Oct-08 2:03
shraddhapingale14-Oct-08 2:03 
AnswerRe: Can windows search api be used for searching sql database? Pin
Dave Kreskowiak14-Oct-08 3:58
mveDave Kreskowiak14-Oct-08 3:58 
GeneralRe: Can windows search api be used for searching sql database? Pin
shraddhapingale14-Oct-08 19:12
shraddhapingale14-Oct-08 19:12 
GeneralRe: Can windows search api be used for searching sql database? Pin
Dave Kreskowiak15-Oct-08 1:35
mveDave Kreskowiak15-Oct-08 1:35 
GeneralRe: Can windows search api be used for searching sql database? Pin
shraddhapingale15-Oct-08 1:39
shraddhapingale15-Oct-08 1:39 
GeneralRe: Can windows search api be used for searching sql database? Pin
Dave Kreskowiak15-Oct-08 2:09
mveDave Kreskowiak15-Oct-08 2:09 
QuestionEnterprise Library not Logging the Exception in Production Pin
Member 173223513-Oct-08 20:58
Member 173223513-Oct-08 20:58 

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.