|
-
Mar 22nd, 2002, 01:56 AM
#1
Thread Starter
Frenzied Member
Kovan's C# Code for FREE
in this thread I will post functions that i write in c# to help anyone else that might need them
all code will be writen in c#, although some of you are thinking "but i want vb.net code" no fear, there is 2 options
1. I will provide the c# raw functions (copy n paste into yoru app)
2. Provide DLL's that you can use in in c# apps or vb.net apps
(code will still be in c# in the dll but of course it can be used in vb)
3. if someone requests a function to actually want a copy in vb.net code, am sure that wont be a major problem
if you have a function that YOU wrote please post it
(make sure it has a lot of comments for people to undrestand and so on)
so far i have released
1. 2 XML Functions
-
Mar 22nd, 2002, 03:35 PM
#2
Hyperactive Member
Put all those codes under "Kovan" namespace...
-
Mar 22nd, 2002, 04:37 PM
#3
Thread Starter
Frenzied Member
fileContentToArray
PHP Code:
/// <summary>
/// This function takes a input parameter of string which contains the path to
/// the file and reads the content of that file into a array list and returns that
/// array list.
/// </summary>
/// <Version>1.0</Version>
/// <Author>
/// Kovan Abdulla
/// [email][email protected][/email]
/// [url="http://www.imetasoft.com"]http://www.imetasoft.com[/url]
/// </Author>
/// <LibrariesRequired>
/// using System.IO;
/// using System.Collection;
/// using System.Windows.Forms;
/// </LibrariesRequired>
/// <returns>ArrayList</returns>
/// <Usage>
/// ArrayList arrList = fileContentToArrayList(@"c:\\myfile.txt")
/// for(int i = 0; i < arrList.Count; i++)
/// MessageBox.Show(arrList[i].toString());
///</Usage>
private ArrayList fileContentToArrayList(string filePath)
{
ArrayList arrListLines = new ArrayList();
try
{
StreamReader fl = new StreamReader(filePath);
while(fl.ReadLine() != null )
{
arrListLines.Add(fl.ReadLine());
}
}
catch(Exception e)
{
MessageBox.Show(e.Message, "Failed reading file");
return null;
}
return arrListLines;
}
Last edited by kovan; Mar 22nd, 2002 at 04:41 PM.
-
Mar 22nd, 2002, 04:40 PM
#4
Thread Starter
Frenzied Member
Originally posted by thinktank2
Put all those codes under "Kovan" namespace...
at the end, they will be compiled into classes
each class containing functions that relate to the class name
like
myFile.cs will contain all the functions related to Files
myDatabase.cs will contain all the functions related to databases and so on
and putting them in a namepsace is not a problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|