Click here to Skip to main content
15,895,667 members
Home / Discussions / C#
   

C#

 
QuestionGetting exception whiling uploading files to SFTP using WinSCP library Pin
MaramKiran19-Mar-15 3:14
MaramKiran19-Mar-15 3:14 
AnswerRe: Getting exception whiling uploading files to SFTP using WinSCP library Pin
CHill6019-Mar-15 3:49
mveCHill6019-Mar-15 3:49 
GeneralRe: Getting exception whiling uploading files to SFTP using WinSCP library Pin
MaramKiran22-Mar-15 21:48
MaramKiran22-Mar-15 21:48 
GeneralRe: Getting exception whiling uploading files to SFTP using WinSCP library Pin
CHill6024-Mar-15 5:51
mveCHill6024-Mar-15 5:51 
QuestionHow To Format the Decimal Number in RDLC as like "hi-IN"? Pin
Paramu197318-Mar-15 20:02
Paramu197318-Mar-15 20:02 
AnswerRe: How To Format the Decimal Number in RDLC as like "hi-IN"? Pin
Freak3019-Mar-15 1:39
Freak3019-Mar-15 1:39 
AnswerRe: How To Format the Decimal Number in RDLC as like "hi-IN"? Pin
Richard Deeming19-Mar-15 3:52
mveRichard Deeming19-Mar-15 3:52 
QuestionI want to algorithm is filtering to send by the server in format text in a single line that contains lasted Pin
Member 1153708318-Mar-15 17:05
Member 1153708318-Mar-15 17:05 
AnswerRe: I want to algorithm is filtering to send by the server in format text in a single line that contains lasted Pin
PIEBALDconsult18-Mar-15 17:12
mvePIEBALDconsult18-Mar-15 17:12 
AnswerRe: I want to algorithm is filtering to send by the server in format text in a single line that contains lasted Pin
phil.o21-Mar-15 2:53
professionalphil.o21-Mar-15 2:53 
QuestionWhat do *you* use Rx for? Pin
SledgeHammer0118-Mar-15 16:46
SledgeHammer0118-Mar-15 16:46 
AnswerRe: What do *you* use Rx for? Pin
Pete O'Hanlon19-Mar-15 1:16
mvePete O'Hanlon19-Mar-15 1:16 
GeneralRe: What do *you* use Rx for? Pin
SledgeHammer0119-Mar-15 9:29
SledgeHammer0119-Mar-15 9:29 
GeneralRe: What do *you* use Rx for? Pin
Pete O'Hanlon20-Mar-15 1:16
mvePete O'Hanlon20-Mar-15 1:16 
GeneralRe: What do *you* use Rx for? Pin
SledgeHammer0120-Mar-15 5:15
SledgeHammer0120-Mar-15 5:15 
GeneralRe: What do *you* use Rx for? Pin
Pete O'Hanlon20-Mar-15 5:38
mvePete O'Hanlon20-Mar-15 5:38 
QuestionAPLICATION Pin
Member 1153708318-Mar-15 15:57
Member 1153708318-Mar-15 15:57 
AnswerRe: APLICATION Pin
Dave Kreskowiak18-Mar-15 16:18
mveDave Kreskowiak18-Mar-15 16:18 
GeneralRe: APLICATION Pin
Pete O'Hanlon18-Mar-15 21:43
mvePete O'Hanlon18-Mar-15 21:43 
GeneralRe: APLICATION Pin
Dave Kreskowiak19-Mar-15 2:12
mveDave Kreskowiak19-Mar-15 2:12 
AnswerRe: APLICATION Pin
PIEBALDconsult18-Mar-15 17:13
mvePIEBALDconsult18-Mar-15 17:13 
Questionnew to c# - confused about substrings (Solved) Pin
Member 1153707618-Mar-15 15:51
Member 1153707618-Mar-15 15:51 
Hello,
I'm new to c# but I have lots of programing experience, mostly with Delphi, and C.

so what I am trying to do is simple
take this string "1/32" ..

look for the "/" .. everything before that is the numerator, everything after is the denominator..

so I can't seem to get this simple code to work! What on earth am I doing wrong? Any help understand what is causing the out of bounds exception for the denominator would be most appreciated.
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ScaleCalc.scaletoolsutility
{
    class testScaleCalcUtils1
    {
        static void Main()
        {
            string stw;
            string st1 = "1/32";
          // this also causes exception 
  
          stw = st1.Substring(1,st1.length -1);
  
         // this causes an exception
           stw = st1.Substring(2, 3);

            Console.WriteLine(stw);


        }
    }
}


modified 18-Mar-15 23:04pm.

AnswerRe: new to c# - confused about substrings Pin
phil.o18-Mar-15 16:03
professionalphil.o18-Mar-15 16:03 
GeneralRe: new to c# - confused about substrings Pin
Member 1153707618-Mar-15 16:42
Member 1153707618-Mar-15 16:42 
GeneralRe: new to c# - confused about substrings Pin
phil.o18-Mar-15 17:06
professionalphil.o18-Mar-15 17:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.