User Profile

Collapse

Profile Sidebar

Collapse
Sameerlucky
Sameerlucky
Last Activity: Feb 13 '08, 03:00 PM
Joined: Feb 13 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • bhatta,

    Go thru the below example..Wil b quite helpful to u...

    This program just demonstrate the use of FileStream & StreamReader. The program take 1 parameter from the user i.e. the file to read.

    using System;
    using System.IO;
    class FileRead
    {
    string filereadbuf; // buffer to store the content of file
    public void ReadFile(string FileName, int FileSize) ...
    See more | Go to post

    Leave a comment:


  • Hi,

    Refer below example..

    while @idx <= len (@sourceStr)
    begin
    set @currOccurence = CharIndex (@subStr,@sourc eStr,@idx)
    if (@currOccurence > 0)
    begin
    set @res = @res + 1
    set @idx = @currOccurence
    end
    else
    set @idx = len(@sourceStr)
    set @idx = @idx + 1
    end
    return @res
    end

    Cheers,
    Sameer
    See more | Go to post

    Leave a comment:


  • Sameerlucky
    replied to Convert Decimal to String
    in .NET
    Shendkar,

    Guess below syntax might b helpful to u...

    stringVal = System.Convert. ToString(decima lVal);

    Cheers,
    Sameer
    See more | Go to post

    Leave a comment:


  • Sameerlucky
    replied to file extension validation
    in .NET
    Gyanender,

    U can use the below example as reference...

    <asp:RegularExp ressionValidato r
    id="RegularExpr essionValidator 1" runat="server"
    ErrorMessage="O nly mp3, m3u or mpeg files are
    allowed!" ValidationExpre ssion="^(([a-zA-
    Z]:)|(\\{2}\w+)\$ ?)(\\(\w[\w
    ].*))+(.mp3|.MP3 |.mpeg|.MPEG|.m 3u|.M3U)$"...
    See more | Go to post

    Leave a comment:


  • Sameerlucky
    replied to IList-Items Retrieval
    in .NET
    Hi,

    I guess below example might b helpful to u..

    public static Dictionary DataSourceToDic tionary(object dataSource, string valueMember, string displayMember)
    {
    IList list = dataSource as IList;
    Dictionary listLookup = new Dictionary();
    if (list != null && list.Count > 0)
    {
    PropertyInfo valueMemberInfo = dataSource.GetT ype().GetGeneri cArguments()[0].GetProperty(va lueMember);...
    See more | Go to post

    Leave a comment:


  • Sameerlucky
    replied to Covert String
    in .NET
    Hi,

    U can use the Convert class
    (convert.todoub le) to convert the string to a double.

    Sameer
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...