all groups > c# > march 2008 > threads for thursday march 20
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 30 31
Anyone from Microsoft confirm this bug or explain this as feature
Posted by Aamir Mahmood at 3/20/2008 11:54:18 PM
I have posted this issue earlier on
microsoft.public.dotnet.languages.csharp, but nobody replied to that.
Consider following code:
--------------------------------------------------------------------------------
private void button1_Click(object sender, EventArgs e) {
using (System.T... more >>
Auto-creating documentation
Posted by K Viltersten at 3/20/2008 11:32:09 PM
Is there a facility in VS Express to
automatically create an API-doc?
I could use the fairly OK Doxygen but
i'd prefer to use something from MS.
--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be... more >>
Detecting Headphones
Posted by Mugunth at 3/20/2008 11:11:46 PM
Is there anyway to detect whether the user has plugged in his
headphones using C#?
How?... more >>
Inherit from generic class type
Posted by butch77@web.de at 3/20/2008 11:05:22 PM
Hi!
I'd like to create a class, that inherits from a generic class type:
public class CompoundObject<T> : T where T : ObjectBase { [...] }
C# won't let me do it. and gives me the CS0689 error
I understand the compile time issue as mentioned in
http://www.thescripts.com/forum/thread44766... more >>
Do we need constructors in an inheriting class?
Posted by K Viltersten at 3/20/2008 9:41:47 PM
I have:
abstract class Vehicle
{
public Vehicle (int i) {...}
abstract public void doMove ();
}
When i write the following:
class Car: Vehicle
magic happens and by pressing a key
combo, VS asks me if i want to extend
the abstract class.
I say, YES! And there it ... more >>
Serious "Installer" class bug (?)
Posted by John L. at 3/20/2008 9:32:05 PM
Hi there,
I created an MSI deployment project and am using the
"System.Configuration.Install.Installer" class to implement some custom
actions at install time. In "Installer.Install()", I save some info in the
".InstallState" file which is routine for those familiar with this class.
Howev... more >>
Creating structs
Posted by K Viltersten at 3/20/2008 8:37:48 PM
I wish to send in a struct called Str
as a parameter to a method. Do i have
to create it first and then send it
in or is it possible to create in
upon construction?
For a class i'd do this.
doSomething (new MyClass (1));
How can i do this for a struct?
--
Regards
Konrad Vilters... more >>
Reading an app.config file from a user control
Posted by Ron at 3/20/2008 3:53:43 PM
I have a user control that is its own assembly. I would like it to
reference the host winforms application's app.config file...is there any way
to do this?
Thanks,
Ron
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
without loading VS2005 on user machine how to make app work? Dev
Posted by Rich at 3/20/2008 1:45:00 PM
On my development machine where I have Visual Studio 2005 loaded, I have an
app that uses the Report control. I can view data in report format with the
Report control -- the data renders OK in the Report control. My problem is
in rendering the report from the rdlc file for printing to a line... more >>
Problem with C++ DLL returning bool
Posted by Thorsten Dittmar at 3/20/2008 1:36:40 PM
Hi there,
we have this C++ DLL we wrote some time ago to do some Win32 native
stuff for us.
The function we're calling in the DLL returns a boolean value (type
bool) indicating success of the operation.
We declare the import in C# like follows:
DllImport("xyz.dll")]
private static e... more >>
Linq, stored procedure with timestamp output column
Posted by Andy at 3/20/2008 1:05:47 PM
Hi,
I am trying to use linq to sql to call a stored procedure.
Here's the proc signature:
CREATE PROCEDURE [dbo].[apConvertDocument]
@FromDocumentId int,
@FromDocumentVersion timestamp,
@CloseFromDocument bit,
@NewDocumentType char(1),
@NewDocumentId int output,
@NewDocumentVers... more >>
Trying to read from generic IList but getting "Option Strict On disallows late binding" restriction
Posted by Ronald S. Cook at 3/20/2008 12:51:05 PM
Hi,
I'm wanting to iterate over a generic IList, but the code won't compile
because the blue sqiggle line under:
_DataRow("SecurityFunctionName") = _IList(i).SecurityFunctionName;
sez "Option Strict On disallows late binding"
If I comment out the line and get to that place in the debug... more >>
I can't stand this compiler.... I spent HOURS (!) trying to make these few lines work:
Posted by Radu at 3/20/2008 12:46:25 PM
I am trying to write a webmethod which would look a bit like this:
-------------------------------------------------------------------------------------------------------
private string ConnectionString
{
get { return
ConfigurationManager.ConnectionStrings["DBConn"].ConnectionString; }
}... more >>
Generics Question - how to implement a method on a generic that returns the same type as the generic
Posted by IUnknown at 3/20/2008 11:34:42 AM
I am having a really bad time with this one. For some reason, I can't
seem to remember how to implement this (elegantly) in c# ... so I
thought I would ask the community.
Basically, I have defined a generic.... and I want to expose a virtual
method on the generic that returns the same gene... more >>
WCF client gets "Object reference not set to an instance of an object"
Posted by jake at 3/20/2008 11:19:13 AM
My WCF client gets this error on the following line:
Line 62: public string[] MyMethod(string keywords, int
numberOfRecords)
Line 63: {
Line 64: return base.Channel.MyMethod(keywords, numberOfRecords);
<---------this is the line
Line 65: }
Line 66:
this is part of:
[System.Diagno... more >>
Saving and retriving images in database through WS
Posted by Marco Pais at 3/20/2008 11:17:55 AM
Hi there.
I'm developing a small application that uses Web Services to access database
and store data.
At some point, I store some images, by inserting the absolute image path
into a varchar field (SQL Server 2005). Images themselves are copied to that
path on the server. To read the ima... more >>
Web app crashes when using MediaPlayer object
Posted by William Johnston at 3/20/2008 11:05:07 AM
Hello,
My Web application crashes when using a MediaPlayer object.
Any idea what's going on?
Thanks,
William Johnston
... more >>
Gettext to localize software, or .resx file editor
Posted by J-L at 3/20/2008 10:38:10 AM
Hi,
I'm searching a real good tutorial on using Gettext and .po files to
localize a software on Visual C# 2008.
Otherwise, a tool to Easily edit a .resx file ...
Thanks for your help ...
Jean-Luc !
... more >>
Unit Testing - The Merit of Writing Tests First is Questioned
Posted by Robert Cramer at 3/20/2008 10:26:53 AM
So I'm looking at this test-driven development (TDD) paradigm, and I like
the idea of having automated tests. That idea is not new.
But according to the TDD approach, we are to write our unit tests FIRST -
even before writing the code that the test is ultimately going to
test/verify.
I d... more >>
Convert IEnumerable to DataTable?
Posted by Ronald S. Cook at 3/20/2008 10:18:06 AM
Does anyone know how to convert an object of type IEnumerable to a
DataTable?
Thanks,
Ron
... more >>
Sorting an ItemCollection - C# 3.5 - WPF
Posted by escher4096 at 3/20/2008 9:33:01 AM
I am attempting to sort the ItemsCollection of a ListView in C# / WPF.
I have it all hooked up and for the base case it is working fine. Base
case assumes binding to a single datatable in a dataset:
/// there is a bunch of other code before this but it all just
sets up for this
... more >>
How to return null from c# class constructor after a validation?
Posted by Saravanan at 3/20/2008 9:10:01 AM
Hi,
This may be a silly question. I would like to return null while creating a
new instance of a class and the validation inside the class constructor
fails.
For example:
class employee
{
public employee(int employeeid)
{
if(isemployeeexist(employeeid))
{
//... more >>
Creating a User Control
Posted by Dom at 3/20/2008 8:25:00 AM
Everytime I create a user control, (such as extending another control,
like TextBox), the IDE sticks into the Designer file, the following:
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
In momst cases, this fails. Why is it there? I'm in the habit of
just commenting it out.... more >>
A simple class library question
Posted by richard d at 3/20/2008 8:06:17 AM
Well - at least I hope it is :-)
Having spent some time developing my c# application, using Visual
Studio 2005, I would now like to start re-factoring some of my code
into a class library so that I can use it in other applications I will
want to write and distribute (by which, BTW, I mean sell... more >>
objects disappear
Posted by Dave at 3/20/2008 7:43:01 AM
I'm using VS 2008 and creating a windows form app. When I drag a textbox,
button, or any other object, it disappears while I've clicked it untill I
release it. I thought this might be a problem with the app i was working on,
but after creating another app the same problem occured. This makes i... more >>
How to delete an event handler
Posted by Dom at 3/20/2008 7:21:52 AM
For various reasons, I need to remove the event handlers for a given
event. The event can only appear on the left side of "+=" or "-=", so
I'm not sure how this is done.
I tried this:
while (t.KeyPress != null) t.KeyPress--;
but the compiler won't accept it. Any ideas?
Dom
... more >>
Master / Detail w/ IList
Posted by news.microsoft.com at 3/20/2008 6:54:07 AM
I have a few classes that I need to present a master detail relationship in
a pair of DataGridViews, i.e.,
class SomeDataList : List<SomeData>
class MyMaster : List<MyDetail> {}
class MyDetail
{
SomeDataList myData;
}
I have setup the first DataGridView
masterDataGridView.DataSour... more >>
Developer Environment Setup Opinions // Seeking your opinion
Posted by granadaCoder at 3/20/2008 5:55:38 AM
I was having a discussion with a colleague earlier today about the
development environment.
I am seeking opinions, and to avoid slanting the input one way or the other,
I am not even going to label which opinion I hold.
The question on the table is about the database location for the DEV... more >>
WeakReference explanation required - please help!
Posted by almurph@altavista.com at 3/20/2008 3:33:31 AM
Hi,
I'm wondering could anyone explain what a weak reference is to me in
C# or perhaps more importantly why it is used.
I ask as I'm reading about an algorithm in the book "C# Cookbook" by
Stephen Teilhet & Jay Hilyard about a light-weight cache. There is a
piece of code that I don't unde... more >>
|