|
ms
newsgroups
|
||||||||||||||||||||
|
||||||||||||||||||||
|
Rich P -
16 Jun 2010 4:03 PM - 10 messages
I have been seeing code samples using notation like this: ... T[] data = source.ToArray(); ... When I try the sample in VS2008 -- I get the following error message: "The type or namespace name 'T' could not be found (are you missing a ...
Maanu -
15 Jun 2010 12:20 PM - 5 messages
Hi, How can I get the IP address of a network card in my machine? I have the NetworkInterface object corresponding to that card Thanks! ...
Tony Johansson -
16 Jun 2010 8:59 AM - 8 messages
Hello! Here I have a piece of code where code marked with 1 and 2 give identical text but code marked with 3 doesn't give the same size of the text. Even if I change code marked with 3 ...
UFO -
14 May 2010 10:20 AM - 12 messages
hello, i would like to know how to use a similar feature that exist on Java, on my C# program. basically , the ThreadLocal allows you to decare&use a variable to be set per thread, without the need to assign it from outside the thread itself.it ...
trubar a -
15 Jun 2010 7:47 PM - 4 messages
hi 1) Is UNCHECKED operator in effect only when expression inside UNCHECKED context uses an explicit cast ( such as byte b1=unchecked((byte)2000); ) and when conversion to particular type can happen implicitly? I’m assuming this since the following expression ...
Joe Eddy -
16 Jun 2010 6:45 PM - 3 messages
So...I've been trying for days to track down a handle leak in one of my applications...it's a very slow leak, but it's in an application that is meant to run continuously and is currently making use restart ...
Luigi -
15 Jun 2010 10:10 AM - 15 messages
Hello, how can I write a method that returns me 10 random numbers from 0 to 20 (included), without repetitions? Thanks a lot. Luigi ...
tom -
16 Jun 2010 12:34 PM - 6 messages
hi i am new at news groups like this . i don't know what kind of problem i can ask ? and one of my friends said me if u could answer these questions it means that now u r a programmer . is it true ?? ...
avanti -
28 Jul 2006 9:11 PM - 4 messages
Hi, I am trying to delete rows from a TableLayoutPanel at Runtime. I tried editing the RowStyles collection but doesn't do what I want it to. I have a table with 10 rows. I want to delete rows 2 to 10 at runtime, ...
Mr. X. -
16 Jun 2010 12:46 PM - 5 messages
Hello. I have VS 2008. Is there any fast way for converting code from VB.NET to C# in VS-2008 ? Thanks :) ...
Tony Johansson -
28 May 2010 7:34 AM - 22 messages
Hi! Is it anyone that might have a good explanation why the designor of .NET made a bool 4 bytes. I mean it's just a wast of memory. //Tony ...
Andreas Bauer -
8 Jun 2010 7:34 AM - 17 messages
Hello, a b c fx 0,639242 0,032636 19,819060 fy 0,003413 -0,646874 273,495500 ...
sahel -
16 Jun 2010 8:22 AM - 6 messages
hi all . i inheritance a class from IComparable but class employee : IComparable // has error******* { public int CompreTo(object obj) { } } but it has an error : 'employee' does not implement interface member ...
bixbarton -
11 Jun 2010 11:07 AM - 9 messages
Hi, I've got a small program, using a DataSet and OracleDataAdapter. Fills a table ok. Loop through the rows ok. Change a couple of values. Then perform an Update on the OracleDataAdapter and it gives me the dreaded... "Concurrency violation: the UpdateCommand affected 0 of the expected 1 ...
Zach -
13 Jun 2010 12:23 AM - 15 messages
Say I have PrintDocument pd = new PrintDocument(); Say I have a file c:\trialk.txt How do I associate the two in order to privide input for ptinting? Thanks, Zach ...
Igor R. -
14 Jun 2010 4:11 PM - 4 messages
Hello, I'd like to pass a type as a parameter to a function. For example: void testTypeCast(Object o, Type t) { // of course, it doesn't compile var casted = o as t; } and I'd like to call it like this: ...
aaron -
14 Jun 2010 1:56 AM - 5 messages
Do you think an entire application (or at least each class) should have a 'final' try-catch block setup for any unexpected errors that could occur? If so, how would you set this up? Would you 'throw' the errors to the final ...
henon -
5 Jun 2010 4:50 PM - 5 messages
Hello .NET community, It has been a while since the last release of GitSharp and as much has been improved it is about time to release version 0.3 of GitSharp. This release does *not* bring you merge support as claimed earlier but ...
Manish -
14 Jun 2010 11:12 AM - 3 messages
Hello ! We are developing a GPRS Connection GateWay Server. The Clients (remote devices) wil get connected to this Server and we are expecting about 50,000 to 100000 such connections within 30 min duration. The peak Load or concurrent load we are expecting is about 10,000 to 30,000 socket ...
nicol -
14 Jun 2010 1:55 PM - 7 messages
hi i have a problem with interface plz help me using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication6 { class Program { static void Main(string[] args) ...
Raj -
12 Jun 2010 11:04 AM - 6 messages
I am using the following code snippet to encrypt/decrypt using DES algorithm. protected string Encrypt(byte[] key, string originalString) { if (String.IsNullOrEmpty(originalString)) ...
jp2msft -
10 Jun 2010 12:05 PM - 15 messages
I've got a library from a government agency that only comes with the .lib and a header (.h) file. The header shows me what methods are exposed, but I'm not sure if I can get to those features through a .Net Framework. ...
nicol -
13 Jun 2010 4:26 AM - 6 messages
hi i know ToString is one of methods in object class . & i use it in my program but i want to show it results when i run program(show it on screen) using System; namespace inheritance_2 { class Program ...
Maddy -
11 Jun 2010 5:49 PM - 3 messages
I am a newbie making a database app. My database is a MS Access database. I have a startup form with a datagrid showing all the records in table called Report.(The Datagrid automatically created a dataset of the entire database.) When a report is selected on this ...
Andrew Falanga -
10 Jun 2010 4:11 PM - 7 messages
Hi, In an earlier post, I was wondering why I can't compile unsafe code *EVEN* when the, "Allow unsafe code," check box is checked. I'm still working on that one. However, the whole problem can be averted if ...
Tony Johansson -
11 Jun 2010 8:12 AM - 6 messages
Hello! What does it mean what it says that you cannot serialize object graphs; you can use XML serialization only on objects ? //Tony ...
sloan -
11 Jun 2010 1:52 PM - 4 messages
My code in see the NonPublic members, but not the Public ones. Full sample code below. FieldInfo[] publicFieldInfos = t.GetFields(BindingFlags.Instance | BindingFlags.Public); is returning nothing. Note, I'm trying to get at the properties on the abstract class as well as ...
Andrew Falanga -
9 Jun 2010 10:11 PM - 4 messages
Hi, This is not the first time I've used unsafe code in C# projects. Usually, I simply check the box in the project properties telling it to allow unsafe code. I've done that for this project, yet VS is ...
Peter Larsen [CPH] -
3 Jun 2010 2:28 PM - 5 messages
Hi, Is there a way to catch all unhandled exceptions in a windows service ? Thank you in advance. BR Peter ...
Travis Parks -
6 Jun 2010 4:12 PM - 18 messages
Hello: I have an internal factory class with methods I want to call from another DLL using reflection. However, trying to do so results in a MethodAccessException. I am assuming this is because library vendors don't want people accessing internal members. Is there a way around this? ...
Peter -
7 Jun 2010 12:08 PM - 5 messages
Hello How can I ensure that a assembly (dll) is not manipulated (e.g. hexeditor). I thought that sign the assembly (snk-File), this ensures. I have tried the following. 1. Create assembly Test.Dll with AssemblyVersionAttribute("1.1.*") and ...
resonance -
8 Jun 2010 8:43 AM - 6 messages
Hello, I want to create a simple login form that includes two textboxes and a button, compare the values in textboxes with the values that are in access database. But I get this message: "No value given for one or more required ...
RayLopez99 -
13 May 2010 3:30 PM - 47 messages
Seriously, who codes in Linux and what platforms, IDEs, etc do they use? What language? I code in C#, have done Windows Forms, WPF, Silverlight, ADO.NET, ASP.NET and some VB and Access dB programming, though I prefer ...
guillaume -
7 Jun 2010 9:10 AM - 5 messages
My question is related to the discussion "about the hashtable and equals" where I learnt a few interesting things. In my company we deal with big volume of data indexed by unique integer ids (for background information, we deal with road traffic ...
Bob S -
3 Jun 2010 2:08 PM - 4 messages
I have been working on generating Outlook 2003 add-ins from Visual Studio 2008. I built the project using the File->new-Project and selected Visual C#->office->2003->Outlook 2003 Add-in. Using pieces from a Microsoft ...
za -
6 Jun 2010 10:43 AM - 8 messages
Hello, I get a CA2000 warning on the following code. public class Taskbar { private static Taskbar _default; private bool _isSynchronized; public static Taskbar Default { if (_default == null) ...
Deep -
7 Jun 2010 2:36 PM - 3 messages
dear friend I have written a code to update table using sqldataadapter. It is not giving error but not updating table. Is it incomplete. Please tell me how to do it? protected void btnUpd_Click(object sender, EventArgs e) ...
Tony Johansson -
5 Jun 2010 11:55 AM - 8 messages
Hello! First some background information before I ask the question.The text is just copied from a book that I'm reading The .Net Framework doesn't always understand equality as we do, however. For example, imagine you created class Fish ...
Tony Johansson -
4 Jun 2010 10:38 PM - 4 messages
Hi! When I run this code below I get square boxes for some code point what does this mean. ? I get square boxes for chinese/japanese and some other. I would say that when the code page exist why is not windows able to display ...
Frank Uray -
4 Jun 2010 12:05 PM - 9 messages
Hi all I have some trouble with threading: I have a control thread which it is starting another thread. This thread is executing some long run SQL statements. The control thread is looping and checking for a cancel flag which the user can set to cancel all. ...
Hector Santos -
1 Jun 2010 7:55 PM - 23 messages
For the longest, for my non-I/O based thread work, I used WaitForMultiObjects (WFMO) as a way to wait for a set of worker threads to complete, simpling by putting the thread handles in an array and passing it to WFMO, for example: ...
Mihajlo Cvetanović -
4 Jun 2010 11:10 AM - 3 messages
Let's say I have an Image and Graphics g. I would expect the following two lines to produce same result, but they don't. Does anyone know why? g.DrawImage(image, new Rectangle(position, image.Size)); g.DrawImage(image, position); ...
AA2e72E -
3 Jun 2010 9:43 AM - 6 messages
.... programatically using C#? Thanks. ...
Tony Johansson -
3 Jun 2010 12:34 PM - 4 messages
Hi! Here I have some example of different encodings. We for example UTF7 and UTF8. But what seems strange is why not Encoding.Unicode is called UTF16 ? StreamWriter swUtf7 = new StreamWriter("utf7.txt", false, ...
Rich P -
28 May 2010 6:51 PM - 6 messages
I have been experimenting a little bit with Entity Framework, and it seems like it is mimicking an In-memory Integrated development environment similar to Microsoft Access which is a "Not" In-memory Integrated development environment. So it appears to me that Entity ...
aaron -
1 Jun 2010 1:13 PM - 4 messages
I would like to know how to use the ConfigurationManager for building (compiling) various parts of a C#.net 2008 windows application. Can you tell me the following: 1. How do you setup more options for 'building' configuration settings (like ...
not_a_commie -
1 Jun 2010 3:52 PM - 3 messages
I'm working on some legacy code that passes variables to other methods in a class via class variables rather than parameters on the method. This seems like bad practice to me, especially from a multithreaded standpoint. I recognize that there are some situations where some ...
Cdudej -
5 May 2010 7:09 AM - 4 messages
I have a dropdownlist what i need to do is add all the months of the year to it. The dropdownlist is bound to a field in the database (eg. 12) , I need the the dropdownbox to display the correct month (eg.December) thanks ...
Mr. Magic -
1 Jun 2010 12:18 PM - 5 messages
I've got various file types (.pdf, .swf, .jpg, .html) that I need to display to the user. After a timer fires, I need to fade the current file out and fade in the next one. Does anybody know of any libraries that will do this? I assume I'll have to ...
Jason Newell -
1 Jun 2010 9:10 PM - 5 messages
All, I'm needing a little help parsing a log file using Regex. Here is an example line from the log. [2010-05-21 02:42:15,307] [WARN,CommandHandler] Duplicate entry I want to simply break the line into the following chunks: ...
Milan -
28 May 2010 10:20 AM - 14 messages
Hi all, I am trying to write application which will intercept ShutDown event and then cancel that even do some backup work and then fire again shut down event. The problem I am facing is that after capturing shutdown event ...
aaron -
1 Jun 2010 1:12 PM - 5 messages
Since I am new to C#.net 2008, I have the following question to ask: Since a solution (.sln file) can have several projects in it, can one project file work with another project file? In other words, can 'object a' in 'project ...
Tony Johansson -
30 May 2010 2:31 PM - 16 messages
Hi! Here is some code. But the code marked with * below how would that //Create a delegete public delegete void MyEventHandler(object sender, EventArgs e); //Create an event member public event MyEventHandler MyEvent; //Invoke the delegete within a method when you need to raise the event, as ...
Gordon Padwick -
30 May 2010 2:42 AM - 3 messages
I am having problems understanding how to use the Convert and ConvertBack methods in WPF. Help in Visual Studio 2008 and the various books I have deal with these methods only superficially. After reproducing various published examples, I tried to use Convert and ...
shapper -
30 May 2010 11:31 AM - 2 messages
Hello, I am trying to create a common "SessionProvider" that a SessionService use. I came up with the following Session provider: // SessionProvider public class SessionProvider<Child> where Child : SessionProvider<Child>, new() { private static String Key { ...
Hector Santos -
30 May 2010 5:03 AM - 2 messages
What do you see in the (main) form properties to implement a NotifyICON so that the form does not "Flicker" on startup? I can make it hide, but there is a flicker. Calling Hide() or setting visible in Form1_Load() doesn't work. So I have it in Form1_Shown(). ...
Hector Santos -
29 May 2010 8:53 PM - 13 messages
I am trying to use the library to set/get settings. Something that normally isn't a hard concept when you using your own logic, but I'm still learning the rich library and wish to use whats there. ...
Ray Mitchell -
28 May 2010 8:46 AM - 4 messages
Hello, Implementing drag & drop in C# seems pretty easy. However, in attempting to do so I ran into an issue that I don't understand. I found that I could drag & drop icons but when I tried to drag & drop text it would always display the ...
Matthijs de Z -
28 May 2010 9:47 AM - 7 messages
Hi, I want to run a linq query on an entity table linke this: var myGroupNameIDvar = (from selecteddonwloadgroup in db.SelEcTedDonWLoadGroup where ...
-- -
26 May 2010 2:50 PM - 8 messages
I've been out of the .NET game for a few years now [pre 2005] and starting a little project using the Entity Framework and WPF. My understanding is that the MVVM pattern is the way to go nowadays, but ...
Rich P -
26 May 2010 6:30 PM - 13 messages
--pseudo code here with the Like keyword -- how to apply it? var query1 = from DataRow myRow in ds1.Tables["tblA"].Rows where (string)myRow["Company"] Like "test" select myRow; I found this sample on the net: ...
Ganze -
26 May 2010 9:26 AM - 7 messages
I work with try/catch block. Since its a multy line method I would like to know excatly what is the last command that passes succefully before going to the catch block. Is there some way to do it without embeding logger messages after every code ...
Hector Santos -
27 May 2010 10:01 PM - 3 messages
I'm trying to port this logic over to C#. In C/C++ I have a typedef struct in an abstract class: class CAbstractServer: public TThread { public: struct TSPDispatch { char *cmd; BOOL (CAbstractServer::*f)(char *args); ...
Igor R. -
26 May 2010 2:55 PM - 7 messages
Is the subj feasible? More detailed question: I've got a WCF service, which must be accessed from a remote application written in c++. I thought it would be much simple, if all the objects in the service would be accessible as COM ...
nicol -
24 May 2010 6:14 PM - 5 messages
Hi I have a very big problem plz help me I want to work with console app So I click on create a project Than visual c# Than windows than console application After entering the name the error will com ...
Anders Eriksson -
26 May 2010 9:02 AM - 8 messages
Hello, I wonder do I create a memory leak by using private void myFunc() { List<String> joblist = new List<string>(); // ... add a alot of string into the joblist } and then call myFunc "repeatedly" from the main program ...
Bob -
25 May 2010 4:58 AM - 6 messages
Say there are 3 fields in an object and you'd like to dynamically create a query that my, or may not, filter on any combination of fields... How woud you do that without using expression trees? Here's the class: ...
rno -
24 May 2010 8:36 PM - 4 messages
Hi, I have a dataset in my application that I write to an XML file using WriteXML. The resulting XML file has a xmlns namespace attribute as part of the root element. When I try and create an XSL file to display some data in a browser, I ...
Tony Johansson -
24 May 2010 4:03 PM - 3 messages
Hi! Here I have some text that I dont fully understand. It says. "Which of the following elements are NOT required if you want a custom class to raise an event. 1 A class that holds event data derived from System.EventArgs ...
Stefan Ram -
26 May 2010 12:31 AM - 5 messages
In Java, I am used to write code like: void f( final int i ){ final int j = g( i ); ... } . But neither »const« nor »readonly« in C# seem to be apppropriate for this purpose. The intention is to enhance readability of source ...
almurph@altavista.com -
24 May 2010 7:52 PM - 4 messages
Hi, I am trying to answer the question of how do you handle an exception of type "ThreadAbortException". I think that it can be caught by a catch and then use the Thread.ResetAbort() method call. I wrote a ...
Tony Johansson -
23 May 2010 1:21 PM - 7 messages
Hi! In this example give the Equals(comparing references) method true because it finds the string hello in the string pool. So when looking at s2 it find that we already have a hello in the pool and the program is using that one. ...
Tony Johansson -
23 May 2010 1:16 AM - 3 messages
Hi! I have the following three declarative permissions. [assembly:RegistryPermission(SecurityAction.RequestMinimum, Read=@"HKEY_LOCAL_MACHINE\Software")] [assembly: UIPermission(SecurityAction.RequestMinimum, Unrestricted=true)] [assembly:RegistryPermission(SecurityAction.RequestOptional, Read=@"HKEY_LOCAL_MACHINE\Software")] Now to my question the assembly only have the following permission 1. RegistryPermission ...
Michael -
19 May 2010 8:28 PM - 5 messages
Could someone please give me some direction? I want to create C# GUIs using Microsoft Visual Studio because I like the way they appear. (I do not know how to program in C# yet.) The GUIs I create on one computer will need to communicate with a machine ...
SteveR -
21 May 2010 12:57 PM - 14 messages
Based on Tom Shelton's recommendation to use an interface class to manage multiple .dll's, I started to write one but got stuck when it came to the event. I have the following event in my .dll's: ...
Webbiz -
21 May 2010 9:21 PM - 5 messages
Hello. Amateur hour Webbiz here. :-) I'm in the middle of learning C# coming from VB6. Yes, it's a jump but a guy's got to move into the 21st Century eventually. Besides, in my past life (1980's) I was pretty familiar with C and C++ so learning ...
Edward -
20 May 2010 9:44 AM - 4 messages
Our clients are happy with our ASP.NET/SQL Server app, but one of their divisions has a preferred technology of JAVA/Oracle and has asked us to do a port. Anyone got any pointers about hints, tips, tricks and gotchas? It's a Customer Query system, if that helps. ...
shapper -
27 Apr 2010 12:45 AM - 7 messages
Hello, I am working with VS 2010 / NET 4.0 to create a simple WPF / C# application. I am using the following assemblies: Microsoft.SqlServer.ConnectionInfo Microsoft.SqlServer.Management.Sdk.Sfc Microsoft.SqlServer.Smo The project builds fine but when I run it I get the following error: ...
shapper -
21 May 2010 4:53 PM - 4 messages
Hello, I have the following list: IList<Int32> roles = { 1, 2, 3 } I need to get all users where in user.Roles there is at least one Role which is id 1, 2 OR 3. var a = users.Where(u => u.Roles. ??? ); ...
Andrew Falanga -
20 May 2010 6:30 PM - 14 messages
Hi, As you know, I can't post the actual code. However, what's below is basically a copy/paste, just cut down to illustrate without the superfluous code. The following code shows the problem: namespace SomeSpace { private struct Struct1 { ...
Breakable -
19 May 2010 5:15 PM - 20 messages
Hi, I am having a lot of pain with a simple issue: Trying to execute a command with parameters something like "iexplore [link]". I am not sure what the command will be or how the command will be formatted, so I would love ...
ArunDhaJ -
19 May 2010 5:16 AM - 5 messages
Hi, I'm using a DataGridView to bind my DataTable. The selection mode is FullRowSelect. I wanted to show a rectangle border for the SelectedRow[0]'th items. I saw in some cases the cell alone is shown with the border, but still ...
Bob -
18 May 2010 11:29 AM - 6 messages
I need to scan a large number of web-resident files, primarily to get file size. IOW, a simple operation. Can anyone provide the benefit of their intuition on how to set the timeout, and how many retries to attempt? ...
Yoavo -
20 May 2010 7:48 AM - 5 messages
Hi, How can I retrieve the Windows OS version as string ? I need to present this information in my application GUI. I am familier with the functions that retrieve this information as enum, but I do not want to parse it myself (and need to update the code every time a ...
shapper -
20 May 2010 3:57 PM - 6 messages
Hello, I have a class that writes to a MemoryStream but I am getting a strange error: ReadTimeout = '((System.IO.Stream)(s)).ReadTimeout' threw an exception of type 'System.InvalidOperationException' base {System.SystemException} = {"Timeouts are not supported on this ...
Tony Johansson -
20 May 2010 9:48 AM - 19 messages
Hi! Here I say minimum 1 o and maximum three o but here I have more then three o and this expression give true but it should give false according to me ? bool status = Regex.IsMatch("foooooood", "o{1,3}"); ...
shapper -
20 May 2010 4:10 PM - 7 messages
Hello, I need to us a TextWriter as an argument of a method: System.IO.TextWriter t; _parser.Go(t); However I get, on the second line, the error: Use of unassigned local variable 't' But I am not able to do the following: ...
Rick -
17 May 2010 3:13 PM - 7 messages
object[,] siblings = { { "John", 25 }, { "Mike", 30 }, { "Tom", 40 } }; Let say I have a value: string searchString = "Mike"; How do I search for the [searchString] in the array siblings and get the age (in case of Mike, it is 30)? ...
Rick -
14 May 2010 8:34 PM - 10 messages
How do I create an array like the following which contains string and integer? string[,] siblings = { {"Mike", 28}, {"Mary", 25}, {"John", 31} }; ...
Webbiz -
19 May 2010 9:42 PM - 5 messages
[Beginner C# Programmer] Say you have an ovalShape control on a form. When you move the mouse around the form, you can easily read the form's X and Y coordinates from the MouseEventsArgs e.Location. However, when the mouse moves into the ovalShape control area, it now ...
Developed using NextGeneration, the .NET Code Generator Try AdSense Reporter, the charting tool for AdSense publishers |
||||||||||||||||||||