all groups > c# > april 2008 > threads for thursday april 10
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
how to improve a performace to send some of data between machine.
Posted by lightdoll at 4/10/2008 11:08:00 PM
hello everyone.
i need your advice to be implemented my code.
i am making some program to send lots of data to Server.
i wrote some code below.
i am using c++/cli and C#, c and c++.
c or c++ will be client
C# will be Server with Net Remoting.
c++/cli is to send data between c/c++ an... more >>
Intermittent problem with XML deserialization
Posted by Michael A. Covington at 4/10/2008 10:50:09 PM
A few of the users of my program are encountering an XmlException that looks
as if the XmlSerializer is seeing an empty file (error at line 0, position
0, root element missing).
I have a hunch the problem is that I was doing this:
StreamReader r = new StreamReader(filename);
XmlSerializer... more >>
XML deserialisation - backwards compatability
Posted by Dylan Nicholson at 4/10/2008 10:33:05 PM
Hello,
I have an issue where I've replaced a single class field with a number
of separate fields that allow more fine control. The problem is that
my old files, saved using XmlSerialization, still have this old field
name in them, and I need to be able to read it and set the new fields
appro... more >>
Learning resources
Posted by John Doe at 4/10/2008 8:36:30 PM
Hi
I've just begun learning C#, and it is really fun. I'm using a book called
"beginning Visual C# 2005 Express Edition, From Novice to Professional". It
manages to explain all the concepts very clear. But, what the book is
missing is some good assignments with proposed solutions.
I wonder... more >>
Consume WebService HelloWorld CSharp in ASP.NET
Posted by Wendi Turner at 4/10/2008 2:42:39 PM
I was just trying to consume the simple HelloWorld webservice that
comes in Visual Studio 2005 with a simple ASP.NET WebSite.
We have created the web reference to the url that serves the
HelloWorld Service and have invoked the response ...
How do we call and post this "Hello World" response ... more >>
Why is a "char *" method parameter being projected as a "sbyte *"?
Posted by Chip Gore at 4/10/2008 2:41:19 PM
Hi -
I know that this is most likely a Microsoft-ism, but none the less...
I have a C++ class
namespace JELLO {
public ref class DEMO
{
public:
DEMO() {;}
~DEMO() {;}
bool DoStuff(const char *s1, char *s2)
{
int a = 1;
}
};
}
And when I try and call this... more >>
Enterprise Cacheing Block
Posted by Eddy Jones at 4/10/2008 2:27:28 PM
I'm looking to implement the Enterprise Cacheing block as a plugin to an ASP
page. I expect this page to be hit many many times a second and I'm
concerned about thread safety. One of the 'bullet points' that I saw in the
description of the block was "Thread Safety" but I've found nothing
... more >>
How to modify the value of a named capture before doing a replace?
Posted by DotNetNewbie at 4/10/2008 2:04:24 PM
Hello,
I have a regex and I want to modify the value of a named capture
before doing the regex.Replace.
So something like:
string text = Regex.Replace(oldText, myRegex, @"<a href="$1">$1</a>",
regexOptions);
Now I want to modify the value of the second $1 just in case it is too
long... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
error 26
Posted by Calico Tude at 4/10/2008 2:04:01 PM
I am trying to connect with a SQL server2005 database from a C# (Windows
application) using a connection string and then use SQLconnection for a data
reader which will use the result returned by a stored procedure. I get "an
error has occurred while establishing a connection to the server .<s... more >>
Implement authorization in win forms
Posted by parez at 4/10/2008 1:49:26 PM
Whats the best way of implementing authorization in a win forms
application.
I mean things like show/hide or enable/disable Save button ,creating
context menus etc.... more >>
Q: Is there a way to se the amount of active sql connections.
Posted by Martin Arvidsson, Visual Systems AB at 4/10/2008 1:36:41 PM
Hi!
I am developing an application, and i suspect i am forgetting to close a
connection.
Is there a way to se how many connections that are active to the sql server?
Studio 2008 and SQL Server 2005 Developer is used.
Regards
Martin
... more >>
string into parms
Posted by rodchar at 4/10/2008 1:32:03 PM
hey all,
what's the best way to turn my csv string into sql parms? the sql parms can
vary in count.
thanks,
rodchar... more >>
regex named captures, are there two similiar syntaxes for this?
Posted by DotNetNewbie at 4/10/2008 1:30:36 PM
Hi,
is this the same thing?
string regex = @"(?'tag'.*?)";
and
string regex = @"(?<tag>.*?)";... more >>
Non Printable Characters using C#
Posted by Greyhound at 4/10/2008 1:20:00 PM
I need to remove non-printable characters from a text file. I need to do
this in C#. The Hex codes for the characters I need to remove are '0C' and
'0A' which equate to 12 and 10 in decimal. Their codes are 'FF' and 'LF'
from the ASCII talbe. I have searched and searched and cannot come up... more >>
Uploading a file and limiting the size of the file.
Posted by Mufasa at 4/10/2008 12:53:50 PM
I am using the file upload control and want to limit the size of the file
that is uploaded. But it appears as if it actually uploads the file and then
does the check. Is that true?
Ideally I'd like to have it give me the results back before it uploads the
file so it doesn't need to waste al... more >>
PerformanceCounterCategory.Create() takes 3 minutes to add a new category!! How come? What can cause this?
Posted by DR at 4/10/2008 12:26:20 PM
PerformanceCounterCategory.Create() takes 3 minutes to add a new category!!
How come? What can cause this?
... more >>
Calculate the number of business hours between two dates.
Posted by Mufasa at 4/10/2008 12:00:36 PM
Anybody have a function that will calculate the number of business hours
between two dates? I will assume eight hours a day and don't want to count
weekends.
TIA - Jeff.
... more >>
Printing Thousands of PDF Files
Posted by Ahmad Jalil Qarshi at 4/10/2008 11:06:12 AM
Hi,
I have to develop an application which will print thousands of pdf files
daily on different printers.
I am planning to use the ShellExecuteEx command with "print" as the verb to
send pdf documents to print. I want to know if its the right way or there is
some other best solution for... more >>
Where do I start?
Posted by Peter Morris at 4/10/2008 10:52:13 AM
After leaving a working project to work on a website I have now returned to
experience the following exception
private void LoadProducers(string currentFileName)
{
AppDomain.CurrentDomain.AppendPrivatePath(Path.GetDirectoryName(currentFileName)); Assembly producerAssembly = Assembly.LoadFi... more >>
IEnumerable vs IEnumerable<T> inconsistency
Posted by Wiktor Zychla [C# MVP] at 4/10/2008 10:46:25 AM
The IEnumerable's documentation says:
"After an enumerator is created or after the Reset method is called, the
MoveNext method must be called to advance the enumerator to the first
element of the collection before reading the value of the Current property;
otherwise, Current is undefined.
C... more >>
"is inaccessible due to its protection level" using a public method of a public class
Posted by Chip Gore at 4/10/2008 10:06:40 AM
Hi -
I have some C++ code (functions) that I'm trying to create a C++ class
for that can be the used as part of a C# project.
(Very simplified)
The C# file
.....................................
using LightBinding;
namespace SrvLib
{
public class Bosco : MoreBosco
{
public st... more >>
Reading a File Via Stream
Posted by william.oram@gmail.com at 4/10/2008 9:09:12 AM
One function in this fabulous DLL (http://www.codeproject.com/KB/
office/excelxmllibrary.aspx) requests a file read in the form of the
Stream class...not StreamWriter or StreamReader or MemoryStream, just
Stream. Since Stream is abstract, this makes it hard. I've done my
best to bounce from Stre... more >>
Provide access to a class without access to the constructor
Posted by Weeble at 4/10/2008 8:43:43 AM
Suppose I have a class A that works with instances of class B. I would
like it so that only an instance of A can generate instances of B, but
I would still like users of A to be able to handle instances of B,
including passing them as arguments to methods on A. Is there any way
to achieve this? ... more >>
ASCII Character Conversion
Posted by Phanidhar at 4/10/2008 8:17:01 AM
Hi,
I'm developing a Winform application in C#( .net 2.0). I've a dialog box
where user can input text and that text would be sent across to other machine
using sockets.
When the user enters ASCII character which are non-printable like ASCII 20
( using ALT+20), this character is convert... more >>
share a structure array containing multidimensional char array C#/
Posted by Aykut Ergin at 4/10/2008 8:03:00 AM
I want to share a structure array containing multi dimensional char array
between C# and C++, by using memory mapped file.
I already have C++ code for handling memory mapped file.
I am passing pointer to the structure array as shown below for C++;
I am able to work with pointer ( for C++ ).
... more >>
Debugging code being run during garbage collection?
Posted by Brian at 4/10/2008 7:32:14 AM
What's the best way to debug code that is being run during garbage
collection?
We are getting AccessViolationExceptions that seem to be happening
during garbage collection. But when it hits the debugger, it is at whatever
line of code the main thread was at when the garbage collector decided... more >>
Network Stream Flush Method question
Posted by parez at 4/10/2008 7:24:01 AM
Hi all,
I found the following in MSDN
The Flush method implements the Stream..::.Flush method; however,
because NetworkStream is not buffered, it has no affect on network
streams. Calling the Flush method does not throw an exception.
So, does the networkstream write directly to the stream... more >>
Question on WebBrowser control
Posted by Dom at 4/10/2008 7:12:50 AM
In the webbrowser control, is there any reason why I can't see the
"CanGoBackChanged" event in the properties box? How do I capture the
event?
Dom... more >>
Serialiazing pure HTML via DataContractSerializer (CDATA?)
Posted by Joerg Battermann at 4/10/2008 7:00:41 AM
Hello there,
I have a class which I can serialize and deserialize just fine, but
one of its fields actually contains html data, including <, > etc. Now
in the serialized .xml files, these are actually escaped or converted
into entities (<) etc.
How do I dump the html just the way it is w... more >>
Time for XP Free? An Open Letter To Microsoft.
Posted by Andy at 4/10/2008 4:00:06 AM
Time for XP Free? An Open Letter To Microsoft Corporation
Since the advent of the PC, the price of all components has dropped
substantially in real terms. The one exception to this rule is the
operating system. To be fair to Microsoft, in terms of value for
money, Vista offers a lot more feat... more >>
MVC as opposed to MVP
Posted by Ben at 4/10/2008 2:58:01 AM
Hi,
I always thought that MVP (Model-View-Presenter) was a newer
design than MVC ((Model-View-Controller), so I assumed that as
time goes by, more and more frameworks would be implemented
using the MVP pattern. But instead, the opposite is happening.
All the major frameworks are MVC based (l... more >>
New coder question: problems with parsing string to int
Posted by CSharp-Jay at 4/10/2008 2:31:33 AM
I am pretty new to csharp myself, but have been trying to do a few
things that I am running into problems with. I know there is a way
around it, but I just dont know what it is. I am hoping somebody here
can help me.
Here is a code example:
string sanswer = "";
int answer;
// have use... more >>
Reading a text file..
Posted by zaldy at 4/10/2008 1:37:05 AM
Hi!
I have a question..
How can csharp read a text file and execute it in another application? What
I mean is that, Im doing a drawing using Tekla Structures. But instead of
doing the same thing over and over again, I want to create an exe file that
allows it to read a text file and execut... more >>
Datareader(simple)
Posted by Cdude at 4/10/2008 12:04:05 AM
SqlCommand findProducts = new SqlCommand("SELECT PRODUCT_TYPE_ID FROM
PRODUCT_TYPE WHERE [NAME] = 'Meals'", sqlConnection1);
This command returns a value of 17. How can i insert this value into
a string variable? Please help . I tried this but it wouldnt work
SqlDataReader myReader = findPr... more >>
Passing Data in MDI Parent form and Child Form
Posted by Saimvp at 4/10/2008 12:03:00 AM
Hi and Hello.
Im new at .net framework. Now Im using C# . I have a little problem.
How can I get a value of a text in the mdi parent form to child form.
Example in VB6:
form1.text1.text = MainForm.text1.text
How to convert it to C#
--
To be Happy is To be Yourself... more >>
|