all groups > c# > march 2008 > threads for friday march 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 30 31
Method/Function name
Posted by pz at 3/28/2008 11:53:09 PM
How do I output the name of the method or a function without hard-coding it
in the application?
Say, I want application to write to stdout the name of the method that
currently is getting executed, to give me better idea how the program logic
is flowing (I am writing a multithreaded applicati... more >>
Insert and update in DLinq DataGridview
Posted by Andrus at 3/28/2008 11:52:18 PM
I tried to edit data in DataGridView.
Insert and delete operations in grid are not saved to database. Updating
works OK.
How to force grid to save Insert and Delete operations also ?
Andrus.
Northwind db = CreateDB();
var list = new BindingList<Customer>(db.GetTable<Customer>().ToList() ... more >>
Share memory between two .net application
Posted by Gjoshi029 at 3/28/2008 11:25:16 PM
How can i share a common memory between two .net programs.
Can it be possible.
Kindly help me.
Thanks... more >>
newbie question on application cache
Posted by Danny Ni at 3/28/2008 11:15:40 PM
Hi,
Will application cache work in a web farm environment? I don't think it will
work because each machine in the farm has its own web application. I am
asked to modify existing source codes which utilize application cache, but I
don't want to jump to conclusion.
The source codes belong ... more >>
Multi developer project
Posted by Priyanka at 3/28/2008 10:47:21 PM
Hello,
I have a VS 2005 project that is a windows application. I want to
upgrade to 2008, but if others do not have the ability to upgrade, can
one developer have 2008 and another have 2005, and there not be any
issues? I hear in 2008 you can target for 2.0, but I know that the
solution... more >>
What's the easiest way to read/write xml?
Posted by Andy B at 3/28/2008 9:43:09 PM
I have this good sized xsd file I created (219 lines long). It is supposed
to be a representation of a contract a business uses. I need to know what
the best and easiest way is to create and use xml files with this schema. I
will be doing a lot of adding/changing/editing of the xml files too. ... more >>
Access Denied message (Signed XML)
Posted by amyl@paxemail.com at 3/28/2008 7:12:51 PM
I am creating a signed XML document through a .Net page. It has been
working flawlessly for several years now. Within the last couple days
it has started throwing the below error. My hosting provider says
they have not made any changes to cause this.
Any ideas on what could be causing this ... more >>
DLLImport memory leaks?
Posted by Brian Stoop at 3/28/2008 2:40:47 PM
..NET 1.1
I have a long running program that runs various methods from system DLL's.
I've pasted some calls below.
My program is leaking memory. Could the leak be due to these calls, or am I
looking in the wrong place ?
thanks, Brian
//
// Struct and DLLImports
//
[Struc... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How can I prevent someone run a "HEX modified" executable ?
Posted by TheSteph at 3/28/2008 1:59:34 PM
Hi,
How can I prevent someone run a modified executable assembly (ie: modified
with an Hex editor) ??
I use .NET 2.0 and VS 2005.
Steph.
... more >>
[off-topic] If I was as dumb as a
Posted by Michael Starberg at 3/28/2008 1:52:39 PM
cat, I wouldn't be worried about linq nor IDisposable.
http://www.youtube.com/watch?v=MQ4vmSvCVbc
Enjoy, and if you hate silly cats, at least the music is great! =)
- Michael Starberg
... more >>
Array sizing
Posted by Neil B at 3/28/2008 1:06:02 PM
In C++ arrays have the .SetAtGrow() method that expands the array to
accommodate the index specified. I don't find an equivalent method in C#.
Is there one??
If not, what is the recommended way to handle this??
Currently I'm using the Resize(....) method but this can be awkward at times.
... more >>
collections
Posted by raulavi at 3/28/2008 12:36:01 PM
vs2005 c#
how do i trap max number of row in a collection ?
lets say I can only have max of two rows in a collection
I have this property
const int MaxCount_SubmitterEDIContactInfos = 2;
private void validate_SubmitterEDIContactInfos()
{
if (_Submitt... more >>
How can I exit a method prematurely
Posted by Roger at 3/28/2008 12:29:35 PM
Hi,
I've implemented a windows service that calls an SSIS package. Every
so often, the SSIS package does not return control to the calling
method. What I've implemented is a sentinel thread that is spawned
before the execute method of the SSIS package which will email me if
execution occurs... more >>
Linq question: loading an object graph
Posted by 0to60 at 3/28/2008 12:21:33 PM
Let's say we have your basic Invoices and InvoiceItems table. If we load
this in with LINQ:
var query = from i in db.Invoices
select i;
When I then loop through my invoices, if I wanna access the lineItems for a
particular invoice, LINQ runs another query behind the s... more >>
Threading issue: Timers.Timer and Forms.BackgroundWorker
Posted by Arthur at 3/28/2008 11:27:12 AM
I developed a simple windows forms application (for controlling a
service application).
As there are no events of the ServiceController class (e.g. "State of
the service applioaction has changed") the forms application can
subscribe to, it polls the state of the service through the
ServiceCon... more >>
Picking up the caching value from a Web.config -- please help
Posted by almurph@altavista.com at 3/28/2008 10:13:55 AM
Hi everyone,
Hope you can help me with this. I have the following inside the
App.config of a DLL:
<cache disableMemoryCollection="false"
disableExpiration="false"
privateBytesLimit="1000"
percentagePhysicalMemoryUsedLimit="2000"
privateBytesPollTime="00:00:00" />
... more >>
Converting a Multidimentional Array
Posted by AMP at 3/28/2008 9:34:50 AM
Hello,
I am trying to convert MD array of ints to doubles;
I just want each x to be converted.
I am getting a Nullexception.
I was able to do this with a single dimention, but I am having
problems here.
OurData is passed correctly but GraphData looks like one dimention
when I get to Line comm... more >>
new keyword scope
Posted by Neil B at 3/28/2008 8:46:01 AM
In C++ when you create an object using the "new" keyword you usually use the
"delete" keyword to end it's scope. In C# I don't find the "delete" keyword.
How do you handle the scope of an object you create with "new"???
Thanks, Neil... more >>
Exceptions while reading a null file
Posted by raulavi at 3/28/2008 8:29:05 AM
vs2005 C#
How many exceptions should I trap when reading a file ?
let me clarify...
c is my pointer to the processing line
I have this code:
public int ProcessFile(string[] file, int c)
{
if (c < file.Leng... more >>
Using custom TypeConverter outside of PropertyGrid
Posted by Cartoper at 3/28/2008 8:28:11 AM
I have written all these wonderful custom TypeConverter for my enums
to display in a PropertyGrid. I would now like to use the same
TypeConverter to save out and read in the values to and from a text
file, in a generic fashion. I would like to have a function like
this:
void WriteValue(Stre... more >>
fire events in derived class
Posted by parez at 3/28/2008 8:23:12 AM
whats the best way of firing events in derived class?
expose a protected function in base class which fires the event?
Also
where should i declare the delegate? same file as the base class?
... more >>
break out of if
Posted by John Rivers at 3/28/2008 7:03:43 AM
it seems a shame you can not do this:
if (blah) {
if (blob) break;
}//if
i know it seems like you can do
if (blah && !blob) {
}//if
but what if you want to do this:
if (blah) {
bunch of code
if (blob1) break;
bunch of code
if (blob2) break;
bunch of code
if (blob3) b... more >>
Combobox databinding
Posted by Vanessa at 3/28/2008 6:41:00 AM
Hi all!
I have a dataset that is binding to a combobox of customers. When I am on
consult mode I'd like to show all customers, and it is working correctly.
Now, when I am including an order I would like to show just the customers who
are active (it is a flag on the dataset). How can I do th... more >>
Update GUI from RunWorkerCompleted
Posted by wilkokosten at 3/28/2008 5:09:01 AM
Dear all,
I have the following question:
I want to populate a datagridview after my BackGroundWorker has finished. I
thought i could use the RunWorkerCompleted event to update my datagridview
but this is not working 'always'.
The strange thing is that when i use a bindingsource directly... more >>
DllImport two dimensional array
Posted by SeC at 3/28/2008 4:58:17 AM
Hello.
I have external DLL with function:
extern "C" __declspec(dllexport)
void ByteTest(BYTE **arr, BYTE w, BYTE h)
{
BYTE tmp = 0;
for(int i=0; i<h; i++)
{
for(int j=0; j<w; j++)
{
arr[i][j] = ++tmp;
}
}
}
Now in C#:
[DllImport("test.dll")]
extern s... more >>
Attempted to read or write protected memory. This is often an indication that other memory is corrupt
Posted by Venu at 3/28/2008 4:04:49 AM
Hi friends,
I'm getting the error
AccessViolationException -
"Attempted to read or write protected memory. This is often an
indication that other memory is corrupt".
i'm loading the image in a form (scanned .tif file) usnig Microsoft
Office Document Imaging. I'm getting this error while cl... more >>
Threading
Posted by davebythesea at 3/28/2008 2:37:00 AM
Hi folks,
In the following code I create a thread and start it. I then call
Thread.Sleep() within that thread. Will this cause the thread I created to
Sleep or will it cause the main application Thread to sleep? I'm hoping it
will cause the created Thread to sleep...
class A
{
priva... more >>
windows forms - transparence question
Posted by Matthias S. at 3/28/2008 1:59:30 AM
hi there,
i'm using .net framework 2.0 and i need a panel to be 50%
transparent/transluctant. i was desperately looking for an opacity
property with no luck. any ideas on how to roll your own?
thanks in advance!
matthias
--
... more >>
IEnumerator/IEnumurable
Posted by Jon Slaughter at 3/28/2008 12:55:38 AM
I do not understand how to implement these two classes. I created a tree
like structure and I implemented the ability to enumerate over it but I'm
mixing generic and nongeneric classes:
This is the class that works:
public class RTree<T> : IEnumerable
{
public List<RTree<T>> Nodes; /... more >>
polymorphic object "against the grain" of C# ?
Posted by Bill Woodruff at 3/28/2008 12:08:41 AM
Consider a class that maintains two private instances of Generic Lists, one
of type string, one of type int :
class PolyClass
{
private List<string> listOStrings;
private List<int> listOInts;
public polyClass
{
listOStrings = new List<string>();
listOInt... more >>
|