|
You can use the string.Split(string[] seperator, StringSplitOptions options) version of split. Use StringSplitOptions.None in the second parameter, and in the first parameter you put you delimiter.
|
|
|
|
|
You have used the wrong delimiter. That means in your text, you must write something but not delimiter. Just take another delimiter, like ";".
|
|
|
|
|
I use this regex:
Regex regExp = new Regex(",(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))");
|
|
|
|
|
Hello Sir Its nice one ,Its working properly.
Thanks for this.
but I am unable to understand this code ,could u plz explain it or give me site referance for this.
bcoz I have a file like
"G.H.",,"","","",,,"Company Friend
Office
Lute
",,,,"Normal","False",,,"Normal"
//my code is
StreamReader r=File.OpenText(file_location);
strUserInfo = r.ReadLine();
if( strUserInfo != null)
{
Regex reg = new Regex(",(?=(?:[^\"]*\"[^\"]*\"])*(?![^\"]*\"))");
string[] split = reg.Split(strUserInfo);
//code
}
in this it read above code as 5 lines(in CSV file it seperate "notes" field) but it should be only one line,what should I do for this?
Thank you again
-- modified at 4:00 Wednesday 2nd August, 2006
Yogesh_T
|
|
|
|
|
Hi there - hope someone can help with this
I've read a little about impersonating users in .Net, but is it possible to impersonate a different PC?
In other words, is it possible to make it look like I am logged in on "PC 1" when actually I am logged in on "PC 2"?
Cheers!
Baz
P.S. I know this sounds kinda dodgy - but it's not at all!!! I do have a legitimate reason for wanting to know this info!!!
|
|
|
|
|
Baz wrote: I do have a legitimate reason for wanting to know this info
Such as?
|
|
|
|
|
I noticed that when the XP visual styles are on, the Panel control sometimes adds a horizontal scroll bar when it is not necessary. The controls in the Panel fit the visible area fine (including the scroll margin and vertical scroll bar). This does not happen when the visual styles are off, i.e. in the Windows classic style ! It doesn't matter if the AutoScroll property is set to true or false.
To fix this problem I wanted to hide the horizontal scroll bar manually. I tried to use the HScroll property. The MSDN documentation on the ScrollableControl (from which Panel is derived) class says:
"To manually override which scroll bars are visible, set the VScroll and HScroll properties. If either property is set to false, the corresponding scroll bar is not visible, even if the AutoScroll property is set to true."
This simply isn't true . You can set the property HScroll to false, but the horizontal scroll bar is still there and remains functional. The method SetScrollState doesn't work either.
Does anyone know how I can suppress a horizontal scroll bar in a panel?
Thanks.
|
|
|
|
|
I still haven't been able to suppress the scroll bar. The panel totally ignores the property HScroll and other scroll bar methods . However, I can now hide the scroll bar using the Interop function ShowScrollBar, although it doesn't prevent the scroll bar to appear briefly.
|
|
|
|
|
Could I get an example of how to do this, I have never used Interop before.
|
|
|
|
|
Can i do this??, i make a pdf with php library but can i open it from c# application?,How can i do? thanks for all
Dios creo un equipo perfecto a los demas los lleno de extranjeros
|
|
|
|
|
I want to upload video files throguh my ASP.Net application. Want to save uploaded videi files in project folder and path of video in database.
Saurabh
|
|
|
|
|
Have you ever heard of GOOGLE ???
|
|
|
|
|
Ya, I have heared about google. But I feel in place of google your specific advice can help me better to solve the problem
Saurabh
|
|
|
|
|
google can sometimes give you answers to your questions and good advice - try to help yourself before expecting others to take their own time to help you
cje
|
|
|
|
|
Hi,
I have launched a new thread for diaplying a modal dialog.
When i recieve an event to close the thread How can I close the dialog.
I have aborted the thread which holds the dialog. But this closes the dialog improperly. I want to close the dialog and the closes its resources manully when i need to close the thread.
Cheers.
Mursil
|
|
|
|
|
Cardinal programming sin #1 is operating on the UI from anything but the (single) UI Thread.
You just discovered why!
Open your dialog on the UI Thread, only operate on it from the UI Thread.
|
|
|
|
|
I have the following hierarchy:
Class a{
int x=0;
}
Class b:a{
int y=0;
}
Class c:b{
int z=0;
}
I'd like to be able to use the Type.GetFields() on an instance of class
C and see the field declared not only on the class, but the inherited
fields as well. I've tried the FlattenHierarchy, NonPublic, and
Instance binding flags (and others), but none of them cause GetFields
to return anything other than a single field for an instance of class
C. If I declare the fields on the superclasses public, it works. What
am I doing wrong?
Thanks,
Jonathan
|
|
|
|
|
The quickest answer to your question, is to create a construtor in your third class and then within it type this. and see what intellisense shows. You will only see the integer within class C.
If you want all inheriting classes to have access to the those integers then this is what you need:
namespace TestInheritance
{
public class A
{
internal int one;
}
public class B : A
{
internal int two;
}
public class C : B
{
int three;
public C()
{
}
}
}
Now when you type this. intellisense will show all three variables. You should also be able to retrieve then generically now with Reflection.
|
|
|
|
|
Hi,
In my application I am saving browsed picture in folder, I want to save the path of all pictures inside the folder to a database table, so in future I can retrieve the pic.
Saurabh
Saurabh
|
|
|
|
|
You have to use the file info object to get the path of the file and then store it in the database.
Do good and have good.
|
|
|
|
|
Hello, I have a problem with 2 genereted wrapper DLL. This is my situation:
I have 2 software installed in the same directory that use Microsoft Web Browser (shdocvw.dll); those software when I compile generate 2 wrapper DLL (AxInterop.SHDocVw.dll and Interop.SHDocVw.dll). The problem is that the DLLs generated by first software are incompatible with the same generated by the second.
My idea is to change the name of the DLLs generated by the second software (Example: AxInterop.SHDocVw2.dll and Interop.SHDocVw2.dll), but here is the problem because this second is a C# software and seem that I can't change the DLL's name.
Can anyone help me?
Thank you very much
SD3
|
|
|
|
|
What I guess is the problem is that when you imported the COM object, it created a new interop dll in .NET with a different signature from the one of the second project. So while your first project is looking for the interop library with signature X, the second project is looking for the interop library with signature Y, that is why it doesn't work.
How to fix it? From the second project delete the references to SHDocVw. Now add a new reference in the second project, but select a .NET reference, and browse to your first project, and select from there the interop libraries.
Now both project use the same library with the same signature.
|
|
|
|
|
Hi all
i am a fresher in c#... my doubt is that when i open a form from another form i want that form to display on the center of the form from where i call ... i dont want to use mdi forms ... can anybody help me??
Thanks
Akhil
|
|
|
|
|
Form1 form1 = new Form1();
form1.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
|
|
|
|
Hi,
Form.StartPosition = FormStartPosition.CenterParent;
Robert
|
|
|
|