all groups > c# > february 2008 > threads for thursday february 28
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
Implement Interface IEnumerator and IEnumerable
Posted by Tony Johansson at 2/28/2008 9:47:46 PM
Hello!!
Based on the book I read and on my previous question and answers from you it
seems to me that
it's really very rare that I have to implement IEnumerable(one method) and
IEnumerator(three methods) because these are already implemented I think in
every collection class in .Net so I c... more >>
newbie question: WPF Data Binding - when to use "dynamic resource"
Posted by indtaz at 2/28/2008 9:02:47 PM
I am new to WPF and DataBinding.
I am trying to create a listbox that will display a list of images in
a stackpanel.
The images themselves are retried from a table defined in SQL Server.
( Database used is the AdventureWorks database)
I am currently able to retrieve the images from the databa... more >>
using ArrayList with object
Posted by Tony Johansson at 2/28/2008 7:00:02 PM
Hello!
The question is about this assignment statement Person pp = arrList[0];
I know that to correct the error I have to write Person pp =
(Person)arrList[0];
But my question is the following.
This statement give compile error. I have always thought that the compiler
doesn't see these k... more >>
adding a tag to a jpeg image file
Posted by Mark Harris at 2/28/2008 3:57:24 PM
I have the following code:
try
{
fi = new FileInfo(fn); //fn is a string from a windows form,
identifying the jpg in the file system
fullPath = fi.DirectoryName + "\\" + fi.Name;
Image bm = Image.FromFile(fullPath, true); //creat... more >>
Count of References of an object
Posted by parez at 2/28/2008 3:36:20 PM
Hi,
I am trying to implement a pooling system Is there any way i can get
a count of references of an object.
I am thinking of basing it on this.
http://aspalliance.com/1131_Understanding_Object_Pooling_in_Microsoft_NET.6
Please help and TIA... more >>
(Please Select), Smith, Bob Jones, Sue .. how remove comma after (Please Select) in LINQ?
Posted by Ronald S. Cook at 2/28/2008 3:35:04 PM
Hey guys,
The below code works fine, BUT appends a comma to my (Please Select).
Anybody know how I can get around this?
Thanks... and sorry is in VB.NET (I wish I was in C# on this project)... but
you guys are WAY more helpful than the VB forum.
Dim _Query As IEnumerable(Of Employee) = ... more >>
About interface Enumerable and IEnumerator
Posted by Tony at 2/28/2008 3:25:47 PM
Hello!
Interface IEnumerable consist of method GetEnumerator() which will return an
object of type IEnumerator.
Now to my question will every object that GetEnumerator return implement
Current, MoveNext and Reset.
I mean in this case I don't have to implement these three methods because
th... more >>
Custom Page class sets all querystring values as properties, but what about UserControls?
Posted by DotNetNewbie at 2/28/2008 3:13:52 PM
Hi,
I have many querystring values that I pass around in my web
application, so I created a Custom Page class that simply inherits
from System.Web.UI.Page.
I then check for all the querystrings in the URL and initialize them,
and these are all public properties so I can reference them from
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Add color to WPF grid from code behind
Posted by DNB at 2/28/2008 2:51:07 PM
I would like to add this color #E7EBF7 to my WPF data grid
I know that I can add light blue color using following:
Grid b = new Grid();
b.Background = System.Windows.Media.Brushes.LightBlue;
but how to add specific color (i.e. #E7EBF7 )
Thanks
DNB
... more >>
Problem with the Invoke Method
Posted by Dom at 2/28/2008 2:41:19 PM
I'm getting a "Parameter Count mismatch error" with the following.
At the class level:
delegate void lvwCallback (object[] Args);
Within a method of the same class:
SQLDataReader r = ...
int TopCount = 100;
lvwCallback Job = new lvwCallback(ShowC... more >>
Reference To An Instantiating Obect
Posted by Microsoft Newsserver at 2/28/2008 2:32:20 PM
I am instantiating an object in an ASP.NET page. From this object I want to
be able to access Session. I dont want to change the constructor to pass the
page reference to it, and I dont want to have to add extra properties.
How can I get a reference to the page object in which the object is ... more >>
App config not seen when running from a logical drive on Vista??
Posted by José_Joye at 2/28/2008 2:11:47 PM
I'm currently facing a problem when runnning an application on Vista from a
logical drive (created with "subst").
The problem occurs when the application is run from command prompt. All is
ok if the application is run from the debugger.
Say I have an application that is located under
C:\te... more >>
Loading Data Into Grid Lasts Too Much
Posted by Diego Armando Maradona at 2/28/2008 2:02:13 PM
Hello,
I have a DEVEXPRESS grid on my form
When I try to load data into the form,
If row count is huge (this example : 45000 row is returned, column count =~
10)
This line waits for a long time to load data into grid
grdMats.DataMember = "MATS"; // THIS LINE WAITS FOR 1 MINUTE... more >>
struggling to save a tiff as a PNG and keep filesize down
Posted by sklett at 2/28/2008 1:08:46 PM
I have a Tiff (fax) with the following properties:
width: 1728
height: 1090
x resolution: 204
y resolution: 98
bit depth: 1
If I open this tiff in Photoshop and change the resolution to 96 and resize
to 816 x 1056, then save as png the size is 3.1Kb (great!)
If I resize the tiff with gd... more >>
Module & Class detection
Posted by HarryBurtonCSharpDetection at 2/28/2008 12:57:02 PM
Hi
I'm looking for a tool to retrive informtion in which class/module a running
C# program executes code.
Just to avoid setting huge amount of break points :)
... more >>
How do I force a repaint from a custom control?
Posted by Tom P. at 2/28/2008 12:43:36 PM
I am making a custom control (a ProgressBar) and was wondering how do
I force the control to paint like the base ProgressBar does? As it is
my control doesn't paint until the main execution loop let's it,
usually with Application.DoEvents. But even if I do an
Application.DoEvents() in my OnPaint... more >>
C# website or tutorial book that has step by step projects to learn?
Posted by Kristen at 2/28/2008 11:34:24 AM
Can anyone recommend a website or book that offers small projects to
do to help you learn the .Net basics and C#? I've been programming for
7+ years but its all been VB6. I'd like to move to .NET but dont know
where to start. I learn better when I can follow along with a sample
project or someth... more >>
MethodInfo.Invoke and TargetInvocationException
Posted by Lasse_Vågsæther_Karlsen at 2/28/2008 10:52:42 AM
We have a base class that relies heavily on MethodInfo.Invoke.
Often, as such things happen, exceptions are thrown in the method that
was invoked, and this pops up as a TargetInvocationException, at the
place of the Invoke command.
I have tried wrapping my call to Invoke like this:
try
... more >>
How set ComboBox to auto-complete?
Posted by Ronald S. Cook at 2/28/2008 10:50:38 AM
In my Windows forms app, I want my ComboBoxes to let the user begin to type
values and it start to populate (if a match is found). But, I don't want
the user to enter a value that is not in the list.
What properties do I need to set to what to make this happen, please?
I think it the invo... more >>
Problems using HttpContext.Current.Request.Url.Host
Posted by Brett R. Wesoloski at 2/28/2008 9:51:15 AM
I am having problems using HttpContext.Current.Request.Url.Host.
I have some code that does this...
if (HttpContext.Current != null)
{
subdomain = HttpContext.Current.Request.Url.Host;
}
Now if I put a break point on the if statemen... more >>
Lifetime of static variable across postbacks
Posted by Deckarep at 2/28/2008 9:37:52 AM
Hey all, this question is somewhat related to ASP.NET but I think it's
very relevant to how the dynamics of the C# language work so I'm
asking it in this forum:
In my webcontrol class that inherits from System.Web.UI.UserControl.
I have a private static variable declared. And on my OnLoad I
... more >>
About the DataGridView event Validating
Posted by Peter at 2/28/2008 8:56:09 AM
Hello!
I have a DataGridView which has been dragged from the Toolbox into the Form
and is called dataGridView1.
My question is about the event Validating. There is an event method below
called dataGridView1_Validating
which has been created automatically when I selected the Validating
event.... more >>
Unable to debug DLL with PDB files
Posted by Martin Horst at 2/28/2008 8:35:40 AM
Hi,
in VS 2003 I had no problem to debug into a dll with an existing pdb
file. In VS 2005 and also in VS 2008 I'm not able to debug into the
source code of the dll. If I try so an explorer window appears where I
have to choose the location of the source file. The pdb file lies inside
the ... more >>
design question( the app is written in c# ;) )
Posted by parez at 2/28/2008 6:20:28 AM
Layer A is on top on Layer B.
Layer A talks to layer B using the interfaces defined in B. For input
and return values.
My question is should i take out the interfaces from B and put it in a
separate project?... more >>
Application Data Folder
Posted by Bob at 2/28/2008 6:03:04 AM
Hi,
How do you get the application folder path that a user select in a msi
install which defaults to c:\Program Files\Company Name\...?
Thanks,
Bob... more >>
Problem Xml and &
Posted by Christian Havel at 2/28/2008 5:58:02 AM
Hi,
I have a xml file with content like following:
<entities>
<entity created="28.02.2008 14:32:31" crudaction="Create">
<item NAME="field1" VALUE="Huber Gmbh & Co. KG" />
</entity>
</entities>
I try to load the file with XmlDocument.Load(pathToXmlFile) and receive a
Xml Excep... more >>
Linux IDE for C#?
Posted by JS at 2/28/2008 5:28:51 AM
Just curious. I'm experimenting with some linux distros and wanted to
try out some of my .net apps using mono. I am wondering if there is
an IDE for c# which runs on linux. (I'm particularly interested in
intellisense, the visual designer is of secondary importance).
Thanks.... more >>
Problem in executing in Exe file?
Posted by Manish at 2/28/2008 5:20:36 AM
Hi friends,
Iam new to this group. I have problem with executing the
output(exe) file in an another system. I have created and compiled in
a VS 2005 tool. when i run the exe file in a new system. its prompting
me for send don't send error. what should i do, for getting the
output. I have i... more >>
MonthCalendar on another form
Posted by SePp at 2/28/2008 3:47:01 AM
Hi there,
I have a WindowsForm which includes a label. I want to add a date to
this label which a user can select.
I thought it is probably the best to open another WindowsForm and to
add on this one a monthcalendar.
My prolbem is: How can I use this MonthcalendarForm to edit / add the
d... more >>
startdate / enddate sum
Posted by nologo at 2/28/2008 1:27:08 AM
all,
I have a startdate and enddate, i wish to be able to calculate how
many weeks have been selected. so for example, using the startdate and
enddate, i select 11/02/2008 and 25/02/2008 i need a method to sum how
many weeks that is.
Any suggestions?Where do i start?
Cheers!... more >>
dataAdapter InsertCommand problems
Posted by J at 2/28/2008 1:00:58 AM
I previously used the following which works fine:
SqlCommandBuilder mySqlCommandBuilder = new SqlCommandBuilder(daAccount);
daAccount.Update(dsAccount, "Account");
But now I also want to retrieve the resulting identity column value from an
INSERT. So I tried the following:
daAccount.Ins... more >>
|