Answer Questions
Aussie Dazz Nested Generic Approach
The following is my class definition public abstract class FieldDefinitionBase<AttributeType> public abstract class FieldDefinitionCollectionBase<T> : List<T> where T: FieldDefinitionBase<Attribute> public class DataFieldDefinition : FieldDefinitionBase<DataFieldAttribute> public class DataFieldDefinitionCollection : FieldDefinitionCollectionBase<DataFieldDefinition> The DataFieldDefinitionCollection can ...Show All
Miles Cohen - MSFT memory address
hello, im trying to simulate the memory management so i want first to allocate x bytes and then working inside that space only.. how can i know the address of my object in the memory thanks I'm sorry I still don't understand what you are trying to achieve and therefore I can't help you. Rather than telling me what you are trying do within code, tell me what you want to achieve in a broader sc ...Show All
GuZ Debug Output
What the meaning of this on my debug output : 'test.exe': Loaded 'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll', No symbols loaded. Your exe has loaded windows.forms from the GAC, without debug info, I would suspect. ...Show All
Yilmaz Ay Does using(IDisposable) induce boxing?
If I have a value type Foo: struct Foo : IDisposable { void Dispose() {}; } And I place an instance of Foo in a using block: Foo bar = new Foo(); using (bar) { ... } My understanding is that bar.Dispose() will be called at the end of the using block. My question is, does this induce boxing Since Foo is a value type, and IDisposable is not, will the C# compiler cast bar to type IDi ...Show All
Paulyz copy datagrid to datatable
is there a way to copy a datagrid into a datatable I could loop through it and copy each value but i'm looking for a cleaner way of doing it In debug mode, can you tell which object reference is not set Make sure the Datagrid has a datasource and that it has been Data bound (Databind()). I wrote a little test app to double check: protected System.Web.UI.WebControls.DataGrid MyDataGrid; priv ...Show All
brettman Handling large dataset
Hi, i have two questions. 1. what is the best method to retrive large table from sql server 2. what is the best method to handling large dataset e.g searching and sorting in c# not in databse level Thanks Wilson This is a loaded question that neeeds some context. Can you answer a few questions. Are you doing WinForm or ASP.NET development Are you going to hold on to the data or use ...Show All
Amandeep Mann Mdi Forms Problem
Hi, first of all m using .net 2005 visual studio, my problem is about mdiparent and child forms Problem: I ve 2 forms name Form1 and Form2, i set Form1.isMdiContainer = true; and i added this line public Form2 TeslimKForm = new Form2 (); public int OpenControl; to Form1.Designer.cs And my Form1.cs file : public Form1() { InitializeComponent(); this .OpenControl = new int (); OpenControl = 0; } private void MainToolSt ...Show All
adwins04 DateTime.Parse and empty strings
I'm trying to import a text file into my SQL table. I'm running into problems when the date field is empty. DateTime.Parse(sField[3]) will throw and exception if the field is blank. I've tried sField[3] =="" null : DateTime.Parse(sField[3]) to no avial, the compiler comlains that it cannot implicitly convert datetime to string. any ideas I found a work around for this, Thanks for your time! ...Show All
SoniaJulka best way to evaluate what type of control there is
whats faster this: if (c.GetType().ToString() == "Sytem.Web.Ui.WebControls.Label") { //something } or this: if (c.GetType() == typeof (Sytem.Web.Ui.WebControls.Label)) { //something } just curious, thanks mcm As Chris Vega says, you can use the is keyword to checks if an object is compatible with a given type. An is expression evaluates to true if the provided expression is non-null, and the provided ob ...Show All
neris Restart Threads?
Hello All, I am trying to work on a client/server software. I have written a thread to manage the socket listening. But the problem is that after the current user disconnects i terminate the thread with :- thrdListener.Join(); or thrdListener.Abort(); But the problem is that i cant restart the same thread again since my thread throws a ThreadStateException Is there any work around for this How can i restart the same thread ...Show All
Claudio Perrone Controls in diferents forms
hi i have this problem: private void Form5_Load(object sender, System.EventArgs e) { Form1 frm1 = new Form1(); string name = frm1.textBox1.Text; MessageBox..Show(name); } on the Form5 i wrote that code.....ill explain u what the program do: u start in Form1 and when u click in a button it ShowDialog the Form5 and in the Form5_Load it should get the text in the textBox1 of Form1 and MessageBox the text it get. the problem is that ...Show All
James L. Bowman III Help with commands in C# Express!
Hi, I installed VC# Express 2005. Now I have problem, I want any command as csc.exe, ilasm.exe, and I always have go to at "C:\Windows\Microsft.NET\Framework\2.0...". How I can for execute its commands from my directory as "C:\miCarpeta" Go to the control panel, open System and add C:\Windows\... to the PATH environment variable. ...Show All
J&#233;r&#244;me Bonnet Pointing to both live and development DB
Trying to understand how to maintain the creation of an application while concurrently using the working components as they are created and populating a database. Simple Example: 1) New project is started, a new database is created. 2) Simple customer entry form is created. The database has several locations where is resides. The project and the output bin (debug) have copies of the DB. There is, and needs to be the actual working co ...Show All
Jim Millar ArrayList copying a class
I am reading a .csv file and loading each record that I read into a class then populating the class into an array list. The issue I have is that the class contains strings and seems to be copied by reference in the array list. Therefore causing an issue when adding additional records the reference is just being written multiple times in the arraylist with the same pointer. A friend suggested I use a dataset instead of an arraylist. I have to do ...Show All
Mike Thorpton table o cant found
hi,my code look like this: DataSet dsKisi = new DataSet(); //... //executing a sql query and fiiling dsKisi dataset //.. gridview1.datasource=dsKisi; i am using a sql query with "inner join" when i debug this, an error occured. "Cannot find table 0." i wrote same query in sql server and no error occured and queried well. Where is the problem thanks.. Without the details under the commen ...Show All
