- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
29 Posted Topics
Re: I think you're asking about the System.Security.Principal namespace. | |
Re: This is a problem with your use of public, protected, and private. Probably somewhere in your inheritance chain. Most likely forgot to add public infront of a class declaration somewhere. | |
Re: You'd be better off (if possible) creating a mixed managed/native DLL in [URL="http://msdn.microsoft.com/en-us/magazine/cc163681.aspx"]C++/CLI[/URL] and adding that DLL as a reference to your C# project. | |
Re: Define "an interface for a C# program". I have to assume you don't mean an interface like IEnumerable, so I'm not sure what you mean. | |
Re: A dynamic count of threads isn't always a good idea, in fact it's often a bad idea. Since you have a quad core machine you should start with 4 threads (one per core), then try 8, 16, 20, etc until you see the logrythmic effect of too many threads. Adding … | |
| |
Re: [QUOTE=dickersonka;668317]Or you could just go the easy route [code] string s= "sample"; s = "daniweb " + s; [/code][/QUOTE] This is better, unless you do it often. Remeber each + used allocates and floats another copy of the string. | |
Re: Personally, I'd make an interface... let's call it IFilterable with a required method let's call Filter. [code] public interface { bool Filter( ); } [/code] The each object in the collection could have a member of type IFilterable that defines the filter is should be using and you could then … | |
Re: You're asking for a lot here. Why is it you want to do this in C# and not Flash or some easy to animate platform? | |
Re: I recommend using HTML + JavaScript. That is exactly what they were designed for. | |
Re: I don't see where you Timer is declared. It's quite possible that it's losing scope and being garbage collected. | |
Re: Well first thing I see the lines [code] // Display tax Console.Write("$"); Console.Write(dectax); // Keep window open Console.ReadLine(); [/code] Should be placed outside the last if block because you'll want them displayed every time. The next thing I see is that it looks like you're doing the math wrong. From … | |
Re: You're looking for DRM software - online... from people willing to give free help... yeah, makes total sense... | |
Re: huh? I'm gonna guess what the heck you mean here, and hand you an answer. [code] List<string> a = new List<string>(); List<string> b = new List<string>(); using ( StreamReader reader = new StreamReader(File.OpenRead(FILE_PATH)) ) { string line = null; string[ ] parts = null; try { while ( (line = … | |
Re: My guess: Windows Server uses much better security modeling than Winows XP does. You really should develop on Windows Vista with UAC turned on (make sure you never trip the UAC dialog with your code!). Most likely you need to fix the NTFS permissions your files have so that they … | |
Re: A standard piece of code I find myself using and reusing, time and time again... [code] using ( FileStream fileStream = File.OpenRead(CONFIG_PATH) ) { Regex entryRegex = new Regex(@"^\s*(?<name>\S+?)\s*\:\s*(?<value>.+?)\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase); using ( StreamReader reader = new StreamReader(fileStream) ) { while ( (line = reader.ReadLine()) != null ) { … | |
Re: You can do it, but it's not recommended. Usually people who want to do their own scheduling set up a Windows Service to do so. You can create one easily with Visual Studio in C#. AFAIK .Net cannot interact with the Task Scheduler directly. There might be something in all … | |
Re: Use a System.Text.RegularExpressions.Regex object. [code] Regex linkRegex = new Regex(@"<link>\s*(?<link>[^<]+)\s*</link>", System.Text.RegularExpressions.RegexOptions.Compiled); Regex titleRegex = new Regex(@"<title>\s*(?<title>[^<]+)\s*</title>", System.Text.RegularExpressions.RegexOptions.Compiled); if ( linkRegex.IsMatch(myString) ) { Match match = linkRegex.Match(myString); string theLink = match.Groups["link"].Value; } if ( titleRegex.IsMatch(myString) ) { Match match = titleRegex.Match(myString); string title = match.Groups["link"].Value; } [/code] | |
Re: You'll have to trust me on this, but you really DO NOT WANT to store the image in your database. Instead store a file path or Uri to the image in your database and read it from disk when you want to display it. | |
Re: The basics are there but a few suggestions for you: [code] using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.IO; public class Program { private readonly string SERVER_PATH = @"\\server\directory"; private readonly string LOCAL_PATH = @"C:\users\username\documents\images"; private readonly string CONNECTION_STRING = "@some;sql=connection; string"; [STAThread] public static int Main( string[ … | |
Re: Check the way your decimal columnis defined in SQL server. It's possible you've defined it to not allow values >= 1.0. Use MSDN to reference how to properly specify the column. Do the same check on your stored procs, they need to match exactly for expected behavior. | |
Re: if youjustneed the fast lookup ability of the dictionary, I believe the compact framework supports the System.Collections namespace, so you can just use a HashTable object which is even faster. | |
Re: Yup, it's a parse error. VC8+ goes right to the line and complains. | |
Re: If you're only trying to emulate a click of the back button, don't use C# use Javascript. Add this code to you page: [code] <button onlick="window.history.go(-1)">Back</button> [/code] | |
Re: Are you using web controls or realy code? :-P As a developer who started in C then migrated to C++ then to C# I tend to avoid as many of the built in controls MSFT offers with the .Net runtime. My suggestion to you is either A) Use remoting (it's … | |
Re: [url]http://www.connectionstrings.com/[/url] for the win! | |
Re: What the...?! Logical AND is a CPU operator that flips bits, how could you possibly do that to a System::String object? You're looking for either a System::Text::RegularExpressions::Regex or &&. In C this would "work" in that you'd compare bits in the pointer, but in C# you don't have direct access … | |
Re: ... Just compile it as C++/CLI and change all the * to ^, and all the cout to System::Console::WriteLine() calls. Then fix the compiler complaints. |
The End.