Click here to Skip to main content
15,893,487 members
Home / Discussions / C#
   

C#

 
AnswerRe: ODBC Connection Problem Pin
Rajesh Anuhya12-Apr-10 21:59
professionalRajesh Anuhya12-Apr-10 21:59 
AnswerRe: ODBC Connection Problem Pin
Som Shekhar12-Apr-10 22:52
Som Shekhar12-Apr-10 22:52 
AnswerRe: ODBC Connection Problem Pin
Morgs Morgan13-Apr-10 4:35
Morgs Morgan13-Apr-10 4:35 
AnswerRe: ODBC Connection Problem Pin
yu-jian15-Apr-10 6:41
yu-jian15-Apr-10 6:41 
Questionoledbdatareader Pin
sachees12312-Apr-10 20:40
sachees12312-Apr-10 20:40 
AnswerRe: oledbdatareader Pin
Abhinav S12-Apr-10 21:08
Abhinav S12-Apr-10 21:08 
GeneralRe: oledbdatareader Pin
sachees12312-Apr-10 21:34
sachees12312-Apr-10 21:34 
QuestionStack Trace incorrect in release mode Pin
KaurGurpreet12-Apr-10 20:22
KaurGurpreet12-Apr-10 20:22 
One of the method is missed in the call stack when code is compiled in release mode. Here is the sample code:

static void Main(string[] args)
{
MyFunc();
Console.ReadKey(false);
}

public static void MyFunc()
{
Console.WriteLine(Program.GetCallStack());
}

public static string GetCallStack()
{
System.Diagnostics.StackTrace callStack = new
System.Diagnostics.StackTrace();
string s = "";
int index = 0;
while (true)
{
System.Diagnostics.StackFrame frame =
callStack.GetFrame(index);
if (frame == null) break;
System.Reflection.MethodBase method = frame.GetMethod();

if (index 0) s = " --" + s;
s = method.DeclaringType.Name + "." + method.Name + "()" + s;
index++;
}
return (s);
}


Why is it so?
Gurpreet

AnswerRe: Stack Trace incorrect in release mode Pin
Martin Jarvis12-Apr-10 20:54
Martin Jarvis12-Apr-10 20:54 
GeneralRe: Stack Trace incorrect in release mode Pin
KaurGurpreet12-Apr-10 21:02
KaurGurpreet12-Apr-10 21:02 
GeneralRe: Stack Trace incorrect in release mode Pin
Martin Jarvis12-Apr-10 21:06
Martin Jarvis12-Apr-10 21:06 
GeneralRe: Stack Trace incorrect in release mode Pin
KaurGurpreet12-Apr-10 21:26
KaurGurpreet12-Apr-10 21:26 
GeneralRe: Stack Trace incorrect in release mode Pin
KaurGurpreet12-Apr-10 22:50
KaurGurpreet12-Apr-10 22:50 
GeneralRe: Stack Trace incorrect in release mode Pin
Martin Jarvis12-Apr-10 22:58
Martin Jarvis12-Apr-10 22:58 
GeneralRe: Stack Trace incorrect in release mode Pin
KaurGurpreet12-Apr-10 23:20
KaurGurpreet12-Apr-10 23:20 
GeneralRe: Stack Trace incorrect in release mode Pin
Martin Jarvis12-Apr-10 23:51
Martin Jarvis12-Apr-10 23:51 
AnswerRe: Stack Trace incorrect in release mode Pin
Paulo Zemek13-Apr-10 9:01
mvaPaulo Zemek13-Apr-10 9:01 
QuestionFile Convert Pin
mjawadkhatri12-Apr-10 20:19
mjawadkhatri12-Apr-10 20:19 
AnswerRe: File Convert Pin
Dave Kreskowiak13-Apr-10 2:07
mveDave Kreskowiak13-Apr-10 2:07 
QuestionIs not Test Driven Development an Oxymoron or just for Algorithms ? Pin
Nadia Monalisa12-Apr-10 19:59
Nadia Monalisa12-Apr-10 19:59 
AnswerRe: Is not Test Driven Development an Oxymoron or just for Algorithms ? Pin
Martin Jarvis12-Apr-10 21:04
Martin Jarvis12-Apr-10 21:04 
GeneralRe: Is not Test Driven Development an Oxymoron or just for Algorithms ? Pin
Nadia Monalisa12-Apr-10 21:12
Nadia Monalisa12-Apr-10 21:12 
AnswerRe: Is not Test Driven Development an Oxymoron or just for Algorithms ? PinPopular
Pete O'Hanlon13-Apr-10 1:37
mvePete O'Hanlon13-Apr-10 1:37 
GeneralRe: Is not Test Driven Development an Oxymoron or just for Algorithms ? Pin
Nadia Monalisa13-Apr-10 1:47
Nadia Monalisa13-Apr-10 1:47 
GeneralRe: Is not Test Driven Development an Oxymoron or just for Algorithms ? Pin
Pete O'Hanlon13-Apr-10 1:53
mvePete O'Hanlon13-Apr-10 1:53 

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.