Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008


all groups > c# > february 2008 > threads for thursday february 21

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

run unix commands with C# Question
Posted by zw at 2/21/2008 11:50:11 PM
Hi I have 2 unix boxes. In each box, I have a unix shell script that captures certain statistics to a file of the unix box. During the run of the 2 shell scripts, I need a common timestamp for both. I'm thinking of writing a C# app to issue commands every few mins to these shell scripts and ...more >>

LINQ reading last Identity
Posted by viepia@nospam.com at 2/21/2008 10:54:05 PM
Hi, I orignally had a SPROC rerturning @@Identiy, it usually works but sometimes it doesn't. In my current project I verified with SQL Server Profiler that I was reading @@Identity just after an Insert, but @@Identiy still returned null. This SPROC appears to work every time: ALTE...more >>

Threading WinForm
Posted by ajk at 2/21/2008 10:42:08 PM
I am confused, I come from Win32 and am now trying to learn C# threading I have a simple winform with a button, in the button's eventhandler I create a thread, I want the thread to report progress to the form i.e. writing a line in a list box, but the app throws an exception complaining about...more >>

C# -> C++ call issue
Posted by Jais Joy at 2/21/2008 10:30:00 PM
Following is my issue. ------------------------------------------- I have a unmanaged application ( C++ , .exe ) which has a class CMyClass with a public member fMyFunct(). You can assume this C++ application is built with /clr option. I need to instantiate CMyClass in a different manag...more >>

Recommend Good books and the C# 3.0, 3.5 Difference
Posted by Guhanath at 2/21/2008 10:01:01 PM
Hi Everyone, I am planning to buy C# book. I am bit confused whether to go for C# 3.0 book or C# 3.5 book. Please suggest me some good books on both. Is there any major difference between c# 3.0 and 3.5? -- Guhan...more >>

ObjectDataSource and Linq. Please, help! I don't know what else to try. Thank You.
Posted by shapper at 2/21/2008 6:57:39 PM
Hello, I used a "Linq to SQL classes" in VS 2008 to map the tables of a database: MyDbDataContext One of the tables is named Tags and has 2 columns: TagID and Text. This table is related to a second table named Articles through a table ArticlesTags. I would like to use an ObjectDataSourc...more >>

ReportViewer whoas...
Posted by forest demon at 2/21/2008 6:37:28 PM
does anyone have a good source for doing reports in web pages? i've searched and serached and found a few examples but when i try these for the part stuff doesn't work like expected. i've seen pretty screenshots of results that people are getting. that's great and all, but some steps would be n...more >>

C# SynchronizedKeyedCollection
Posted by NvrBst at 2/21/2008 6:24:48 PM
I've been playing around with a bunch of synchronization classes latly but I can't seem to get the following one to work? When I do "SynchronizedKeyedCollection<int,int> myDic = new SynchronizedKeyedCollection<int,int>();" I get the error: Cannot create an instance of the abstract class or i...more >>



Disposing of brushes
Posted by Peter Webb at 2/21/2008 6:16:51 PM
I am supposed to manually dispose of some instances, such as Brushes, right? I have a couple of questions: 1. I have the following code, and it works just fine: penarea.DrawString(selectedslot.drawString,new Font("Arial",fontsize), new SolidBrush(selectedslot.colour),new Point(0,this.Hei...more >>

Does String.Replace always recreate a new string object?
Posted by Sin Jeong-hun at 2/21/2008 6:03:26 PM
If I use something like this, string html = "<h1>C# is great</h1>"; Console.WriteLine(html.Replace("&lt;","<").Replace("&gt;",">")); Does this recreate new string objects two times, even though it has nothing to replace, and it is OK to return the same string object? I know, regular expre...more >>

Cannot access HasValue and Value Property of Nullable class
Posted by Aamir Mahmood at 2/21/2008 5:17:15 PM
Hi I am unable to access the HasValue and Value properties in an Nullable object. int? i = 9; object value = i; if ((value as Nullable).HasValue) { ... } It does not compile. VS2005 says "System.Nullable does not contain a definition of HasValue". I want to achieve this to make ...more >>

Community Experience With Iterators vs Overwriting
Posted by jehugaleahsa@gmail.com at 2/21/2008 4:37:54 PM
Hello: I was running some tests today and found an interesting result. I have a large library where half the methods work on IEnumerable<T> (Iterators similar to LINQ), and another that works on List<T>, using indices to overwrite values. I wanted to see which performed better overall (I gu...more >>

.NET 2, Win98
Posted by Peter Morris at 2/21/2008 4:20:20 PM
I have developed a .NET2 app in VS2008 but it wont install on Win98 (A required DLL is missing). Can anyone tell me what I need to install on Win98 to run the MSI? Thanks Pete ...more >>

Creating a Database Table within Access 2003/2007
Posted by Johnny E Jensen at 2/21/2008 1:52:05 PM
Hej Group Using C# (Visual Studio 2005) I would like to be able to create a table in an Access 2003/2007 database. I am using OLEDB provider but i can see how to do this. Can anone give me a hint? Kind regards Johnny E. Jensen ...more >>

How do I tell if a string is a file or a directory?
Posted by Tom P. at 2/21/2008 1:50:41 PM
I looked and the last guy to ask this was in 2005 and he didn't get an answer either. I have an application that is handling both files and directories (like a file manager). I need to be able to determine if the string passed in is a file or a directory. It's not good enough to use File.Ex...more >>

Favorite Tutorials for C# 3.5?
Posted by Siegfried Heintze at 2/21/2008 1:48:01 PM
I'm getting audio only for the first presentation on http://msdn.microsoft.com that is at https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&EventID=1032360541&CountryCode=US&tapm=A85S01G02 I've tried both the high definition and the low definition. Is there somethin...more >>

ImageList indexer returns Copy of Image instead of Reference
Posted by KenN at 2/21/2008 1:36:01 PM
We're using a System.Windows.Forms.ImageList to store a bunch of Images that I've loaded, and rendering each image in the ImageList during a draw loop. The process was running unusually slow and was causing memory spikes. After several hours we discovered that the ImageList.Images indexer is...more >>

dynamic cast?
Posted by Jamie McQuay at 2/21/2008 11:52:14 AM
I receive an object from an event and I need to go through a long list of types to determine the type to cast to. For example if (myObject is A) { propertyGrid.SelectedObject = (A)myObject; } else if (myObject is B) { propertyGrid.SelectedObject = (B)myObject; } is there...more >>

Help with some code
Posted by John Rogers at 2/21/2008 11:28:33 AM
I just found this code and I am eager to get it working to see if it really works. I am having a few problems with some lines that are not referencing peoperly. Can someone show me how to correct these errors. ..Items and .Columns the compiler does not like. public System.Windows.Forms.Pr...more >>

eventargs - performance question
Posted by Piotrekk at 2/21/2008 10:41:33 AM
Hi I have created event to use it when user is pressing a button on the joystick. In the parameters I need to pass states of all buttons. I will need to call event subscribers each 1ms. For this purpose I have created the following class. class StateChangedEventArgs : EventArgs { ...more >>

Extract the text in RTF string programmatically
Posted by GD at 2/21/2008 10:31:53 AM
Is there any way or class for extracting text from RTF string programmatically without any visual control? For example, get the string "Text in RTF" from "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq7\fcharset0 Humnst777 BT;}} {\colortbl ;\red255\green255\blue153;\red...more >>

How add/concatenate "Please Select" row to result set in LINQ?
Posted by Ronald S. Cook at 2/21/2008 10:26:25 AM
Sorry to post this here, but there's not much talent on the VB board (yes, kissing up in hopes for some help). I'm simply trying to add a "(Please Select)" row to a combobox in a Windows form. But, since it's LINQ, I'm in unfamiliar territory. In the below, it seems like I must have (Of L...more >>

Doing a SVN-Update on a certain directory using C#?
Posted by Oltmans at 2/21/2008 10:16:22 AM
Hi all, I'm new to sub-version and still learning the process. We've a scenario in our office where we do a Svn-Update on a certain folder to fetch the latest code and then we deploy that directory (after verifying the version number in one of the files in that directory). Now I just want to...more >>

String.format with numbers less than zero
Posted by hharry at 2/21/2008 10:12:58 AM
Hello All, I am using the following to format numbers precise to 2 decimal places with thousand separators: Double number = 100000.87; string MyString = String.Format("{0:0,0.00}", number); // 100,000.87 which is fine. When the number is less than zero: Double number = 0.8756; string ...more >>

LINQ for SQL Aggregates
Posted by Shimon Sim at 2/21/2008 9:18:45 AM
I am having hard time figuring out how to reproduce following SQL in LINQ SELECT State.Name, City.Name, COUNT(Person.PersonId) FROM State INNER JOIN City ON State.StateId=City.StateId INNER JOIN Person Person.CityId=City.CityId GROUP BY State.Name, City.Name I have few quires similar to thi...more >>

Gaining access to properties of elements on a web page
Posted by jbonifacejr at 2/21/2008 8:06:12 AM
Hello everyone. Very sorry if I am posting in the wrong place. I am writing a test harnes that will be required to interact with elements on a web page, such as inserting text in a text box. At some step in the test I will have to identify the text box using properties such as the name or id (...more >>

detect and close a modal dailog in c#
Posted by Leni2000 at 2/21/2008 7:43:05 AM
Hi, I would like to write a c# application. to detect if a modal dialog opens on another application, (e.g. notepad.exe save changes dialog when you click exit ) and auto cancel it. How do I detect the modal dialog opening? Thanks for your help Leni...more >>

C# compiler challenge - see if you can answer why...
Posted by Jim at FCSMO at 2/21/2008 7:42:04 AM
[Apologies for the bad code formatting - such is posting on the Web.] The following code produces an infinite loop in its second while loop. using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace Foo { class Program {...more >>

Stack<T>, object memory usage query.
Posted by Jesper, Denmark at 2/21/2008 6:38:01 AM
Hi, I'm using a stack<T>. Is there a way to set an upper limit for the number of elements in the stack such that a push operation can 'push' the first element out of the root of the LIFO collection. Is there a way to messure the memory allocated/used by an object and all the objects t...more >>

DateTimePicker - Disable user from using arrow keys?
Posted by Artie at 2/21/2008 6:33:27 AM
Hi, I want to force the user to only use the drop down and calendar to select a date in the DatetimePicker control. I do NOT want them to select the control, then use the up and down arrow keys to change the date. How can I prevent them using the arrow keys? Any help much appreciated. ...more >>

Ads for software
Posted by Sehboo at 2/21/2008 6:23:13 AM
I am not sure if this is the right group, but since my windows application is written in c# I'll just try my luch here. I want to put ads/banners on my software. Is there such a thing as google's ads for softwares (instead of websites)? thanks...more >>

Like Typedef(In C++) operation what is option in C#.
Posted by Swapnil at 2/21/2008 5:37:02 AM
hi, we can use Typedef in C++ . To perform the same operation in C# How can i use? Please Explain with example. ...more >>

Sort structure on date
Posted by RP at 2/21/2008 5:31:13 AM
I have three grids on my Form namely, grid1, grid2 and grid3. grid3 is readonly and is only to display result. Each grid has identical columns i.e., Date and Amount. grid1 and grid2 can have n number of rows depending upon user-entry. I need to combine entries in grid1 and grid2 in a place where...more >>

Using web.sitemap to hold SEO meta data
Posted by Mark at 2/21/2008 5:24:18 AM
here's what i've got so far in my code beind if (SiteMap.CurrentNode != null) { if (SiteMap.CurrentNode["metaKeywords"] != null) { strMetaKeywords = SiteMap.CurrentNode["metaKeywords"]; strMetaDescription = SiteMap.CurrentNode.Description; } ...more >>

dynamic web reference appears to be worthless
Posted by blekros at 2/21/2008 5:14:33 AM
Group, Back in VS 2003 .NET 1.1 days, I used to create a special dll xml configuration file to hold my web reference URL and load it from there. After loading VS2005 .NET 2.0, lo, there it is a dynamic web reference that puts itself in its own <dllname.dll>.config file. Does this mean th...more >>

DateTime.Now.Ticks vs QueryPerformanceCounter
Posted by Peter at 2/21/2008 4:07:34 AM
Hi I am using a "Timing" class which performs timing measurements - and returns "tick" values to me. The tick values are however wildly different from DateTime.Now.Ticks, and I have found out that this is due to the fact that the class is using a high resolution windows' timer (QueryPerform...more >>

Serialization and Enumerators
Posted by Reuben at 2/21/2008 3:22:01 AM
Hi, I've been trying to rewrite some code which can run as a single method so that I can save its state - that way I can resume processing the data when I start the program back up. The data isn't actually stored in an array, due to memory issues, instead it's generated at runtime by an Enume...more >>

Simple question about Keyboard shortcut.
Posted by Aranis at 2/21/2008 2:25:16 AM
Would anyone know how to use a keyboard shortcut so at the end of a method syntax I can use that shortcut to create the method's pair of { } brackets ? Thank you much, Aranis ...more >>

Multiple PDF, PPT, DOC to html or text conversion
Posted by osiceanu at 2/21/2008 2:18:00 AM
Hello, I have a asp.net application storing pdf files and word documents into db. The problem appears when trying to show a preview of a document on the aspx page. That is converting the document to html or text. Is there a method for doing it? Keeping the images in the document or the format...more >>

linking to enumeration members in xml comments
Posted by tsahiasher@gmail.com at 2/21/2008 12:23:12 AM
i often see in MSDN and third party component providers link to enum members in their docs. but if i try to do something like <see cref="MyEnum.Member1"/> i always get an error from the compiler, that the member doesn't exist or something. how can i link to members of an enumeration, like i link...more >>


DevelopmentNow Blog