|
Can any body send me the interview questions..I dont want direct questions
I wan the questions which are very tricky and concptual....
|
|
|
|
|
Try Programming Interviews Exposed (Mongan & SUojanen) published by Wiley.
|
|
|
|
|
I think you missed a forum hear
But if this is somehow C# related please be more specific!
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
CWIZO wrote:
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
LOL
|
|
|
|
|
Thanx, made that ups myself
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I am using a numericUpDown control which represents a minutes (for time) value. I want it to display 00, 01, 02, etc... for numbers less than 10. Is there a simple way to do this with a property (I reviewed the documentation, but didn't see anything immediately)?
I know I could do it if I inherit the control, but I was hoping for a simple property or somethign to accomplish it. Something that I missed in the documentation.
Can it be done without inheriting it?
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
The property you are looking for is not available.
|
|
|
|
|
No property like this is available, but if you extend NumericUpDown you can simply override UpdateEditText . If Hexidecimal is set, be sure to call the base.UpdateEditText unless you want to handle this yourself. Also, when formatting the number, don't forget to take the ThousandsSeparate into account.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thank Heath...that's kind of what I thought. I figured I'd have to inherit/extend it to make it work. I just wanted to make sure there wasn't a property for it that I missed before I went through all the trouble.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
I take it that you looked at the class documentation for the NumericUpDown class, right? Deriving from your sig, "there are 10 types of people in this world...those that read the documentation and those that do not." (Unfortunately, most of the posters here fall in the latter category.)
Typically, you can learn everything you need to know from the docs (add that to experience and reading articles on MSDN, CodeProject, et. al.). If some member overrides a base member of defined new and you find the documentation a little lacking on details, use ildasm.exe - the IL disassembler that comes with the .NET Framework SDK - to view the IL for the implementation in that assembly, or use a good decompiler like .NET Reflector[^] (though its decompiler rarely incorrect / incomplete). You can learn a heck of a lot that way - perhaps even pick up a few pointers from the developers at Microsoft who wrote the base class libraries.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Yes, I did read the documentation, the problem is that Microsoft documentation isn't always as solid as it could be. Once you've "done it", then you see in retrospect how to "do it", but that doesn't mean the documentation just explains every nuance. Far from it usually. That was why I said up front that I knew it was possible if I inherited the class, but wanted to make sure there wasn't a proprety or something like that I was missing.
I'll keep that in mind about the ildasm.exe....I remember you showing me that on the COM DLL problem I had last week.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
<br />
typedef struct<br />
{<br />
char *item[100];<br />
int top;<br />
}strstk, *strstkptr;<br />
<br />
char *chartostr(char);<br />
char *process(strstkptr);<br />
char *pop(strstkptr);<br />
void push(strstkptr, char *);<br />
<br />
int main()<br />
{<br />
strstkptr pS=(strstkptr)malloc(sizeof(strstk));<br />
char *p;<br />
char buf[100];<br />
char *pV;<br />
<br />
while(scanf("%s", buf) !=EOF){<br />
switch(buf[0]){<br />
case '(':<br />
case '+':<br />
case '*':<br />
p=chartostr(buf[0]);<br />
push(pS, p);<br />
break;<br />
case ')':<br />
pV=process(pS);<br />
if(pS->top==0)<br />
printf("%s ", pV);<br />
else<br />
p=malloc(100);<br />
sprintf(p,"%d", pV);<br />
push(pS, pV);<br />
break;<br />
default:<br />
break;<br />
}<br />
}<br />
<br />
}<br />
<br />
char *pop(strstkptr pS)<br />
{<br />
return pS->item[--pS->top];<br />
}<br />
<br />
void push(strstkptr pS, char *pV)<br />
{<br />
pS->item[pS->top++]=pV;<br />
}<br />
<br />
char *process(strstkptr pS)<br />
{<br />
char *p, *py, *px;<br />
<br />
while((p=pop(pS)) != "("){<br />
if(p="*"){<br />
py=pop(pS);<br />
px=pop(pS);<br />
<br />
}<br />
else<br />
py=pop(pS);<br />
px=pop(pS);<br />
<br />
<br />
<br />
} <br />
}<br />
<br />
char *chartostr(char ch)<br />
{<br />
char *p=malloc(2);<br />
p[0]=ch;<br />
p[1]=0;<br />
return p;<br />
}<br />
I don't know know how I'm supposed to to add or multiply from my stack can anybody help
|
|
|
|
|
C# discussions
Methinks you're not going to get much help here. Try here[^]
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
Support Bone
It's a weird Life
|
|
|
|
|
Hi,
I would like to convert a string of numbers to an integer. I know in C it used to be atoi() but I don't know the equivalent in C# if it exists.
Thanks,
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
you can use the following statement:
int num = int.Parse(yourStringofNumbers, NumberStyles.Integer)
but declare:
using System.Globalization
|
|
|
|
|
|
Thanks! I'll give it a try.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Hello everyone,
I have few crystal reports in a project. I need to combine all the reports in one pdf. I can print each report in one pdf file but need to combine all of them in one. Any help would be highly appreciated
Thanks in advance
Ali
|
|
|
|
|
Hi, I looking for :
1/ blinking a Row of ListView;
2/ Show the last row inserted in the ListView when inserted a rnew row.
Best Regards
youssef
|
|
|
|
|
A simple way of flashing a row would be to use a timer (that disables itself after a number of iterations) that toggles the BackColor and FrontColor of the ListViewItem . You could make this consistent with windows by using the appropriate members of the SystemColors class (like Active* and Inactive* colors).
When you say "last row", do you mean the one that was just inserted? If you insert, you'll already know the index because you must specify one in order to insert it. If you add, just get the ListView.Items.Count - 1 . Take that index and assign that to ListView.SelectedIndices to new int[] {index} . You could also keep a reference to the last ListViewItem and set ListViewItem.Selected to true .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Is it possible to write my own outlook, but only interface (UI) wise? In other words, does Outlook provide access to it's internals (database, code to send recieve email, account information, etc.)?
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
I don't think you want to go there. Outlook does a hell of a lot more than you could possibly imagine.
Outlook does expose its object model, though, providing you programmatic access to send emails, enumerate folders and items, and more. I've used this years ago in a couple different scheduling-type applications.
You can find more about the Outlook object model - along with simple examples - at Office Solutions Development[^], under which you'll find topics on development and articles outlining different solutions.
If you're using Office 2003 Professional (including Enterprise Professional, which is only available with volume purchase orders), be sure to install the Office primary interop assemblies (called something like ".NET Framework Programming Support" or something). If you have Office XP (and they should work in part from '95 up), you can download the PIAs and view information on them at http://msdn.microsoft.com/library/en-us/dnoxpta/html/odc_oxppias.asp[^].
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
You are a wealth of information, knock on wood!
Heath Stewart wrote:
be sure to install the Office primary interop assemblies
I did. How can I use them? Should they be added to that folder where the mshtml interop assembly is?
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
Just run the batch script in the PIA folder if you haven't already. This installs them into the Global Assembly Cache (GAC), which makes them available to all .NET applications without having duplicate assemblies in your application folder. For that matter, the Microsoft.mshtml.dll assembly should be in the the GAC as well if you installed VS.NET. The GAC is a far better place to put assemblies that multiple applications could use because it fosters assembly versioning and is non-specific to any one application. You only need to add a reference to these assemblies in VS.NET for your project, then.
IIRC, the Office XP PIAs do not install a registry key that VS.NET uses to find assemblies in folders (the references dialog does not scan the GAC). To do this, open the registry editor (regedit.exe), go to HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders and add a new key with the default value set to the folder in which your PIAs are located. See the other keys there for examples. Restart VS.NET and when you open the Add Reference dialog, you'll them listed.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I must be exceptionally dense today. I have a class derived from ListView and I am trying to handle the notification event when the user resizes a column in the header. I tried to capture it in WndProc as follows:
protected override void WndProc(ref Message m)
{
NMHEADER header;
if(m.Msg == 0x004E)
{
header = (NMHEADER) Marshal.PtrToStructure(m.LParam, typeof(NMHEADER));
int code = (int)header.hdr.code;
if(code == -308)
{
}
}
base.WndProc(ref m);
}
What am I doing wrong?
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|