Answer Questions
Gustavo Echeverry C# File signature
Is there away in C# to search or get the signature of a file This is a simple explanation of file signatures: "On a windows system a file signature identifying the type of file is normally contained in the first 20 bytes of the file. For example a Windows Bitmap file with the file extension .bmp would contain "424D" hexadecimal in the first 20 bytes." File signatures are also used in antivirus programs. An antivirus ...Show All
Raj410 Objects stored in a hashtable - by reference?
Hi, I'm writing an interpreter in c#. For variables I have a system where I have a class representing a variable: class var { public Hashtable Children; public object Value; } When a variable is declared, I do something like this: var Temp = new var(); Temp.Value = something; VarIndex.Add("variable name",Temp); However I've found adding the Temp ...Show All
ControlBox Saving/Loading a List<> to file.
I’m in need of a good way to save load a generic List<> to a file, XML, txt or whatever. How should you do that in an easy way All tips are welcomed!! if u want in xml use [Serialize] like this i use Class using System; using System.Collections.Generic; using System.Text; using System.Xml.Serialization; using System.Xml; using System.IO; namespace AVUK.BusinessEntities { [ ...Show All
Sewoodford removing all except specified character [] from string
Hi, I need to know How can I excluding any characters of a string except a specified set of characters defined by Char[ ]. Example: if I have Char[ ] x = {..,..,..,.........}; string y; and y is a mixture of characters in x and other characters not in x so how can I return a string z that contains only the characters belong to x and excluding all others Thanks in advance for any help. Aya. ...Show All
Rob Caron Login and remembering logged in user
Hi, i'm totally new to windows development and i cant figure out some propably verry easy things(easy for me in asp.net but not in windows). So here is what i want to do: 1) i want to have a login screen when a user opens my programm. types in password and username and then will be opened a new window where he can see task linked to him. 2) i want create a user class and by login create an object of this class wich would be available to all form ...Show All
Forch how can i databind for a windows application?
good day everyone, i tried to do databind() in a windows application but it wasunsuccessful. is there any way to extract data from several tables like the databind() method in win application i used it before in web application and it was working fine any idea anyone plz help...urgent....thanks.. Please don't post in multiple forums. You're using C++ What's the code look like Because winf ...Show All
Skyguard file.exists does not check file on a network
Hi friends am using VS2005 and C# .i have method which accepts a file path and if its valid it reads text from that file and display it in textbox (am doing this asp.net page). this works fine with files on my machine but when i pass a network drive file path File.exists always return .F. !!! why and how can i read files from a mapped drive Yes my user account has full rights read/write files from those mapped drives . Thanks for ur advice. ...Show All
Odair MS C# step by step XML code commenting
Can you still comment code with xml I have a book i bought in 2002, and just dusted it off, the directions are Tools menu build comment web pages, im running 2005. NDoc doesn't currently support VS2005/.Net2 projects very well at all. The last stable release of NDoc is a year old! I'd advise waiting a while until the VS2005/.Net2 compatible version is released... Anyway, to the OP: XML code comments are of course still sup ...Show All
Scooter&#33; Integration of NT service project in existing project
i have a seprate Windows Service(NT service) project which i developed in C#,when I run this program it adds entry in Services panel then i can start/stop service i want to make a GUI interface for starting and stopping of service,i am being kinda lazy,not willing to write code in existing project All i want to add reference of that NT serivice in & ...Show All
AndresF test for null: This works, but is there another way?
I've got a DataGridView with a date type "ReportDate" as first field. When entering row, if the row is empty, then set the readonly to false (allow edits). (This test actually takes the length of the date for the test - not a warm fuzzy feeling. )Otherwise set it to true (don't want pesky fingers tinkering with good data). The rule is that if anything in the row is populated, all fields are, so can test for any one field being prese ...Show All
arm Resizing
I have the following issue: When I want to resize he form and its controls. Does Autosize handle it all , or do you have to code all sizes manualy Ok. Use the Dock property, you can set that do DockStyle.Fill and it will fill its parent (Form, Panel, etc). You must not set the Anchor property to non, but pin it up on every side, Top, Left, Right, Bottom. This should do the same as Dock, but doesn't fill his parant but just go with ...Show All
BadrK C# analog clock runs slow on some computers
Hi all, I have a problem with the System.Threading.Timer class that I am using for my clock. The clock runs faster on an Intel box than it does on an AMD box and it has nothing to do with the CPU speed. Has anyone come across this before Any suggestions would be much appreciated. Ok, I have found that it is not a cpu problem as I have another box with an AMD Duron XP 1000MHz(5x200) which runs at the correct speed. I have tried it on another co ...Show All
360tester Constructing an ENUM from a simple ResultSet
Hi all, Is it possible for me to Construct an ENUM from a ResultSet returned from a Database. For example, I want the following ENUM... /// <summary> /// A list of all filter types, Status. /// </summary> public enum StatusFilter { All = 0, Open = 1, Complete = 2, Unfinished = 3 } Where I want this to be identical to what is returned from my Status's Lookup table, where I have four entries (along with their pr ...Show All
Nick Porter Could I "inlcude" a C# source file?
For example, there are three C# project in my solution, and I want to synchronize their version. What I have to do now is to manually edit "AssemblyInfo.cs" file in every project. If there were a way to "include" a C# file, put information common to all projects in that file, it would be much easier to maintain it. Thanks! No, it's not what I want. I think what he want is to have a consistent and uniform metadata for all the assebli ...Show All
Daison can someone convert this snipet of VB to c#?? Just Some Simple one (basics)
Hi This shouldn`t be difficult .. but i dont know VB But what does this means... He declare a function named with "Afunction" and then in the body of that fucntion he says.. Afunction= ..... LoL , how does he do that or what does that mean in c# can a name of a function take some value Please tell it what does this means in c# sure.. sorry i`m not very good at explaining something i dont ...Show All
