|
System.Object
System.Diagnostics.Debug
System.Collections.Generic.List
System.Convert
System.Action
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I also responded Object first because of the word "used" then I answered things like String, List, Int and Debug. This seems to me so basic than I hesitated to answer that. Happy to see I'm not alone.
|
|
|
|
|
Do note that Int isn't a class : it's a struct ...
You looking for sympathy?
You'll find it in the dictionary, between sympathomimetic and sympatric
(Page 1788, if it helps)
|
|
|
|
|
In answer to your email (the question appears to have vanished):
Int is a synonym for Int32 , and Int16 , Int32 , and Int64 are all struct
Have a look here: Using struct and class - what's that all about?[^] - it tries to explain the difference.
You looking for sympathy?
You'll find it in the dictionary, between sympathomimetic and sympatric
(Page 1788, if it helps)
|
|
|
|
|
Interesting that System.Convert is in there. I think I've only ever used it about twice (well directly, anyway).
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote:
Interesting that System.Convert is in there |
Most people don't "like" the class. It's not interesting which is better, what is interesting is whether the *interviewer* would ask why I choose the class. Chances are, the question never comes.
static void Main(string[] args)
{
string s = null;
Console.WriteLine((string)s);
Console.WriteLine("" + s);
Console.WriteLine(Convert.ToString(s));
Console.ReadLine();
}
Now, an object that can contain null would not be casted to an Int - most people would parse it (and ignore any conversion errors). If prefer to convert it all if there's a lot of different types after another that need to be assigned. Otherwise, I go for casting.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You use Object itself more than say String?
|
|
|
|
|
jschell wrote:
You use Object itself more than say String? Dunno, I did not measure them - just the first five non-structs that popped into my head. A string is still a pointer to an array of bytes to me. Nothing fancy, just an address. Outside of that, it's a shame Interfaces were not included, it would have made the answer much more interesting.
Given inheritance, I'd say I use a LOT of Object
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
I responded Object first then String, List, maybe Int even it's a struct and Debug, Console, something like that.
|
|
|
|
|
This is where you wished you'd remember something absurdly obscure like AsyncStateMachineAttribute.
|
|
|
|
|
B413 wrote: What is the best answer to this question?
If an interviewer thinks there is a best answer to that question then you can be sure that the interviewer doesn't know what they are doing. At best they don't understand the interview process and at worst they are arrogant.
There are of course bad answers to that question - like "what is a class?"
|
|
|
|
|
system.web.ui
system.io
system.data
system.configuration
system.data.sql

|
|
|
|
|
System.web.ui
system.io
system.data
system.data.sqlclient
system.configuration 
|
|
|
|
|
|
Suspicious link is suspicious. And "not an image". Try this one: http://i.imgur.com/NzoGrFa.png[^]
This looks trivial to OCR. That term should get you started.
|
|
|
|
|
The technique you are looking for is Optical Character Recognition. Good luck.
|
|
|
|
|
|
|
thanks in advanced but i have seen this but cannot use it give a lot of error.
do you have and ready example and dll's.
and
Can it convert the sample image of mine to number or not?
|
|
|
|
|
jojoba20 wrote: Can it convert the sample image of mine to number or not?
This is where YOU do the research to find out. Nobody else is going to do YOUR work for you.
The only way to find out is to try it and I don't think anyone is going to do your work for you for free.
|
|
|
|
|
I think Emgu (an openCV wrapper) can do this. Alternatively check out AForge.Net
|
|
|
|
|
Hey there,
can you help me or tell me about your expirience with IPropertySetStorage? I found this by Google and i think this is what i have to use to set custom file properties.
Is there anybody who use this before and can tell me a little bit more about it?
Thanks a lot!
|
|
|
|
|
|
Hi,
I have crrated below windows service and installed it using InstallShield. I am able to see the windows service Started in the Control Panel-Services but I am not getting any email when the minutes turns to 30.
Can anyone help please...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Net.Mail;
namespace MyTestWindowsService
{
public partial class MyTestWindowsService : ServiceBase
{
public MyTestWindowsService()
{
InitializeComponent();
if (!System.Diagnostics.EventLog.SourceExists("MyTestWindowsService"))
{
System.Diagnostics.EventLog.CreateEventSource("MySource", "MyNewLog");
}
eventLog1.Source = "MyEventLogSource";
eventLog1.Log = "MyNewLog Comes here!";
}
protected override void OnStart(string[] args)
{
eventLog1.WriteEntry("In OnStart");
}
protected override void OnStop()
{
eventLog1.WriteEntry("In onStop.");
}
protected override void OnContinue()
{
eventLog1.WriteEntry("In OnContinue.");
}
private void timer1_Tick(object sender, EventArgs e)
{
if (DateTime.Now.Minute == 30)
{
eventLog1.WriteEntry("starting to send email.");
try
{
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
mail.From = new MailAddress("it@mydomain.com");
mail.To.Add("jassim@mydomain.com");
mail.Subject = "Test Mail";
mail.Body = "This is for testing SMTP mail from GMAIL";
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("it@mydomain.com", "mypassword");
SmtpServer.EnableSsl = true;
SmtpServer.Send(mail);
eventLog1.WriteEntry("email sent.");
}
catch (Exception ex)
{
eventLog1.WriteEntry("failed sending email.");
}
}
}
}
}
Technology News @ www.JassimRahma.com
|
|
|
|