-
- Searching for a string item in List<string>
by Kulvinder
- 6 Replies
- Last post
by Thomas Danecker
- Hi,
I have a List<string> and a string value. I want to do a case insensitive check whether the string value i have is present in the string collection i have. I used List<string>.Contains(string item) method but it does a case sensitive check.
Is there any way that i can check whether my string value is present in the list without worry for case I mean :
List<
-
- Detecting Windows events
by EduardoPayan
- 2 Replies
- Last post
by Peter Ritchie
- What i am trying to do is that, if a user creates an image file in a certain folder, a background program detects such event and triggers the automatic creation of a text file which will be related to this image fils by having the same name (Except of course for the extension).
It's just an idea that popped in my mind a few minutes ago... and I wonder if i could develop it in some way.
Thank
-
- How to change the name of C# Project
by ranadheer mac
- 4 Replies
- Last post
by ahmedilyas
- Dear friends
my question may sounds little bit different.
yes it is how to change the name of C# project.
i have made a .dll file using VS2005 C#
it contains several class files and windowsforms and referal dll's
now after finishing that project i just want to change the name of the whole project.
any guide lines to follow.
Thnaks and regards
Ranu
-
- params without parameters
by Selcux
- 4 Replies
- Last post
by James Curran
- public static void UseParams( params int[] list) { for (int i = 0 ; i < list.Length; i++) { Console.WriteLine(list ); } Console.WriteLine(); } Assume that I have such method. What if I call it wihout parameters. Like UseParams(); It works but I wonder if it will be a problem or not. Should I use it in that way
-
- Event best practice
by dotnetluke
- 11 Replies
- Last post
by dotnetluke
- I need to create an event class that will:
The event will fire in one class...and a different class will consume the event.
public class Event
{
public delegate void MyHandler ();
public event MyHandler MyEvent;
public void FireEvent
{
MyEvent();
}
}
How to I subscribe to the event class
-
- Conversion Issue from VS.NET 2002 to VS.NET 2005
by Vishal Shah
- 4 Replies
- Last post
by Vishal Shah
- All the classes are converted to partial and in the user controls the shared property has following error. "Reference to a non-shared member requires an object reference".
-
- TimeSpan in Table.Select statement
by AlexBB
- 5 Replies
- Last post
by AlexBB
- I have a field in a table which is TimeSpan and I need to do Select on it. All my statements threw an exception.
TimeSpan tsp;
Table.Select ("timeOfDay = #" + ( TimeSpan )tsp + "#" ); Cannot perform '=' operation on System.TimeSpan and System.DateTime.
Table.Select ("timeOfDay = ''" + ( TimeSpan )tsp + "'" ); Cannot perform '=' operation
-
- Unhandled exception only when running in release without debugger attached.
by utterlyconfused
- 14 Replies
- Last post
by utterlyconfused
- I am beyond baffled by this. My application throws a System.AccessViolationException only when it is run in Release mode without the debugger attached (as in, I run the exe directly, outside of Visual Studio or I do "Start Without Debugging" in the Debug menu). Debug mode - everything works great; Release mode with debugger attached - everything works great. The very nature of how this e
-
- Q: Using the ThreadPool class
by kirchu
- 14 Replies
- Last post
by Sean Hederman
- Hello everybody. I have a little trouble using the ThreadPool class. The logic is the following. I have a class called Render and a method in it.
-
- .NET Application does not start
by sanchez911
- 9 Replies
- Last post
by Timur SHAKIROV
- Hi! I'm have following problem: my .NET application does not start on another computer. It has Win XP SP2, I've installed .NET Framework (2.0) from my distributive of Visual Studio, but problem remains. When I try to launch this application, just nothing happens, it appears in processes for a short time and than dissapears. There are no any error messages.
Application is simple "hello worl
-
- Object class and value data type
by brother14th
- 11 Replies
- Last post
by Figo Fei - MSFT
- Hi All, I cheked the Object.ToString method in MSDN this morning. It says that
This method can be overridden in a derived class to return values that are meaningful for that type.For example, the base data types, such as Int32 , implement ToString so that it returns the string form of the value that the object represents... After reading these, I've two questions. Q1)Can Int32 be conside
-
- Using the "as" Keyword
by Tryin2Bgood
- 5 Replies
- Last post
by boban.s
- Will using the "as" keyword when using type conversion not through an Invalid cast exception If so how would i make this statement the same but use the as keyword instead of the =
_EndingVendorLegs.EndID = ((Tracking.BusinessObjects. StopOrderLegDetail )tempOrderManifest[ this .tempOrderManifest.Count - 1]).StopID;
I want to see if it could be
_EndingVendorLegs.EndID as ((T
-
- Virtual parameters on a function?
by Al Pike
- 6 Replies
- Last post
by Al Pike
- Is there such a concept as virtual parameters as part of a function definition in C#
I believe this is similar in concept the problem of 'dynamic casting' that I sometimes have seen posts about which I understand is not possible but virtual parameters could be a 'doable exception' that I think serves the same purpose.
Let me explain what I want to do. I want to extend an exsiting set
-
- May I use FieldAccessException for own purpose ?
by mhoffmann
- 5 Replies
- Last post
by sirjis
- Hi,
I wanna throw an Exception when assignments are made to field-corresponding properties, which are already
initialized, 'cause I want to force a user of the class to use Change..-Methods on already
initialized fields , which implement a confirm-dialog before overwriting existing data.
Would it be bad style to use the NET-FieldAccessException for that ( It's not really
-
- Problem with delegates and invoke
by mhmani21
- 2 Replies
- Last post
by mhmani21
- Hi.
I have a networking application. All that is transfered between the client and server is string, nothing else. I deal with the the netwroking things in a class library. I send my info to server using functions and when I receive the answer from server, depending on what it is, I'll decide what I need to do in the client. At some point, I need to receive a list o names form server, and updat
-
- How to Serialize an array whose type is decided during runtime?
by Chaitanya Vempati
- 6 Replies
- Last post
by Peter Ritchie
- Hi,
I have the following problem:
I want to use a class with an array
public class readVariable
{
public string name;
public string type;
public Array value;
}
The instance of this class is created during runtime using Array.CreateInstance method. The type of array is decided by the "type" string which is read from the user. So
-
- Create Window
by sachin kumar rana
- 2 Replies
- Last post
by Figo Fei - MSFT
- Hello ,
I want to create a Window and place it over any running application. My Window should behave as if it is the part of running application.
Any ideas.. Pls suggest me . If possible please give me some code sample or list of APIs ..
Thanks
Sachin Kumar Rana
-
- A question of OO structure...
by BenFinkel
- 11 Replies
- Last post
by BenFinkel
- Hello All, I'll do my best to explain what I'm trying to accomplish and look forward to any and all suggestions you have for the "proper" way to do this (realizing there is no 100% correct way, but some methods are more optimal than others). I apologize in advance for my n00bness. For this example, I'll use football (american) players. I want my Player class to have a List<Stat> co
-
- Date & Time
by ABCsharp
- 8 Replies
- Last post
by ABCsharp
- hi,
im doing a project and i am required to display date & time. however, im unable to get the codes online, i tried researching but to no avail. can somebody help me on it. i jus want to get the current time n date. thanks.
-
- Dependent Assemblies not copy over multiple levels
by THURST80
- 4 Replies
- Last post
by THURST80
- It appears that following my conversion to .NET 2 some of my dependent assemblies aren't getting copied accross more than one level.
i.e. SmartCheckRemoteBusinessServices references SmartCheckDataAccessObject that references both SmartCheckBusinessObjectPersistenceMappingAU and SmartCheckBusinessObjectPersistenceMappingUK .
SmartCheckBusinessObjectPersistenceMappingAU.dll and SmartCheckB
-
- obtaining the index of a checkbox from inside an event
by christopherbouy
- 3 Replies
- Last post
by christopherbouy
- Quick Question I have an array of checkboxes,(not a checkbox list), created at runtime and inserted in a panel. Upon creation, they're each attached to the same CheckChanged event. Within this event, how do I know the index of the checkbox that triggered it Thanks in advance.
-
- How to have multiple sets of application settings?
by FredKotelet
- 6 Replies
- Last post
by Steven E Blake
- Hi,
I'm using the standard mechanism to set and retrieve application settings (using app.config, Settings.settings and Settings.Designer.cs). I can set the application settings using the Visual Studio IDE and retrieve them like this:
string title = Properties. Settings .Default.WindowTitle;
This works fine - for a single set of settings. But now I'd like to run multiple instances of my a
-
- validating gender
by adorer
- 6 Replies
- Last post
by adorer
- I am using this code to validate my records ..
but the problem come always from gender ... I want it to be male or female
but alwayes when I type male it does not pass the validator..
help me this is m code
if (Request.QueryString["username"]=="123" && Request.QueryString["password"]=="123")
{
if (Request.QueryString["
-
- Tab value in .txt file
by Krutika
- 2 Replies
- Last post
by Krutika
- I have a method which takes 2 parameters delimitors as string and data as dataset public void createTxtFile(string delimitor, DataSet newData) The method reads the dataset, adds delimitor after each value in dataset, writes to .txt file The problem is how do I pass tab value to the method Can anyone help
-
- Simple C# SQL Reading Question
by StevenAFC
- 4 Replies
- Last post
by StevenAFC
- string strSQLCon = "Provider=SQLOLEDB;Data Source=TECRA\\SQLEXPRESS;Initial Catalog=Elsie;User ID=primUser;Password=Password"; string strSQLQuery = "SELECT * FROM Test"; ADODB.Connection Conn = new ADODB.Connection(); ADODB.Recordset RS = new ADODB.Recordset(); Conn.Open(strSQLCon,null,null,-1); RS.Open(strSQLQuery,strSQLCon,ADODB.CursorType