|
So You used the same text again
Frazzle the name say's it all
|
|
|
|
|
That's why I have it in the database!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
I agree with Griff. Just document that SQL Server is required and let the user decide how best to satisfy the requirement.
I would also add that if you include version X of some software it may be out of date by the time a user installs it. (SQL Server 2012 is just around the corner, the user may even have a beta.)
|
|
|
|
|
|
Hi,
Here I'm getting one problem. I can't able to print text on Cheque.
give me full description to this problem, please help me.....
|
|
|
|
|
Please tell us what is the component you are using there ? (exp: Crystal report)
|
|
|
|
|
Hello Everybody,
I am using Session in web service. But i am using web service in window application .
when i am calling method of web service object. It generate error. object refrence not set to an instance of an object.
Pls provide me help for this topic.
If you can think then I Can.
|
|
|
|
|
Look at the reference where the error occurs and try to diagnose why it has not been initialised with a reference to a real object.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
you can attach the debugger to the client code. When you hit the web service call, step into it. This will load your web service into your runtime or go to a separate debugger(if the web service is attached to your another instance of the debugger).
Step into your code to see where the object reference is null.
Something you can inspect is to see - Does your webservice need authentication? Is the authentication information setup correctly before the call?
|
|
|
|
|
I have 3 lists inside each i am having CD class inside CD there are 5-6 nested classes (CDA, CDB, CDC ...) inside each nested class i have 25-30 double collection properties.
I want to add these 3 lists....
Can anyone help me plz??
|
|
|
|
|
I need some more clarity on "What exactly you want to do ?"
|
|
|
|
|
CD contains chart data for one analysis which is used to generate charts based on analysis you did. CDA , CDB ... each nested class containing data to generate one chart. i mean CDA for one chart . CDB for 2nd chart.. CDC for 3rd chart...... like this..
Now client wants to generate charts by selecting two or more analysis.
So now i am struggling to find out how can I add data for multiple analysis.
Is it clear or i need to elaborate more
|
|
|
|
|
saurabh001 wrote: I want to add these 3 lists....
Add them to what? To each other, then just create a new list and add each one to the new list. To some other list or object ... ?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
yes.. Add them to new list ..
|
|
|
|
|
Adding lists is a simple matter (see here[^]), what is your difficulty?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Use the List<T>.AddRange function - it will add all the elements of any IEmumerable to a List<T>
List<string> l1 = new List<string>();
...
List<string> l2 = new List<string>();
...
l2.AddRange(l1)
;
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Hi OriginalGriff,
I dont want to append list. i want sum
Regards
Saurabh
|
|
|
|
|
I suggest you repost this here, or on C# QA, with a code example clearly showing the structure of the Lists, and clearly showing exactly what the final result's structure (another List ?) should be, and telling us, clearly, how the final result is composed from the outermost Classes, using the innermost Classes, and their inner Properties (of Type: List of doubles).
From what you've disclosed here, we can only make "wild guesses" at the underlying structure like:
public class CD
{
public CD(?) {?}
public class CDA
{
public CDA(?) {?}
public List<double> cda1 {get; set;}
public List<double> cda2 {get; set;}
}
public class CDB {}
public class CDC {}
}
public List1<CD> list1 = new List<CD>();
public List2<CD> list2 = new List<CD>();
public List3<CD> list3 = new List<CD>();
public List<CD> SumOfLists = You need to clarify exactly what you mean by "nested." And, is inheritance used in any way here ?
"Anyone who shows me my 'blind spots' gives me the gift of sight." ... a thought from the shallows of the deeply shallow mind of ... Bill
|
|
|
|
|
hello guys... I have got this email program from internet, which works absolutely fine. But I wanna catch exceptions when something goes wrong, and I dont know what to catch. Here is the program
SmtpClient client = new SmtpClient("smtp.gmail.com");
client.Port = 587;
client.EnableSsl = true;
client.Credentials = new System.Net.NetworkCredential("username@gmail.com", "password");
MailMessage msg;
MailAddress from;
MailAddress to;
from = new MailAddress("From Email Address", "my name here", System.Text.Encoding.UTF8);
to = new MailAddress("To Email Address");
msg = new MailMessage(from, to);
msg.Body = txtBody.Text;
msg.Body += Environment.NewLine;
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.Subject = txtSubject.Text;
msg.SubjectEncoding = System.Text.Encoding.UTF8;
client.Send(msg);
msg.Dispose();
thnx for any suggestions.
|
|
|
|
|
You should at least catch an SmptException , which will be thrown if for any reason the email was unable to be sent. You can use the SmtpStatusCode enum to find out the reason, something like this:_
try
{
client.Send(message);
}
catch (SmtpException ex)
{
MessageBox.Show(String.Format("Error: {0}", ex.StatusCode));
}
Hope this helps
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Here is what I do.
string RetMsg = string.Empty;
try
{
client.Send(message);
RetMsg = "Success";
}
catch (SmtpException ex)
{
RetMsg = String.Format("Error: {0}", ex.StatusCode);
}
MessageBox.Show(RetMsg);
Now I receiver's email address something like: "address@yaho.com". You see there is problem with the mail address? But it still shows me Success. What's wrong?
|
|
|
|
|
There is nothing wrong with that email address; there may well be a domain out there called yaho.com. However, if that domain does not exist the SMTP system will send you a message telling you that the email is undeliverable; but that will not cause an exception in your code.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
SmtpClient has no conception of correct email addresses. It will send the message to any address you type in, regardless of whether it is a correct address or not. You will only get notification that the sending failed from your smtp server. If you want to send messages to correct email addresses, you will need to construct your own validation routine, using something like regular expressions or a list of known(authorised) addresses, and pass all messages through that first before sending.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
that's not good enough. You should use sendasync coupled with a completeCallback.
Then you should have the error/delivery failure. That depends on the SMTP Mail server itself that you are using. See here
All the best,
Dan
|
|
|
|
|
I have 3 classes:
[Serializable]
public class _ModelBase
{
public Guid Id { get; set; }
public string Caption { get; set; }
public string Description { get; set; }
public bool IsActive { get; set; }
public int Sequence { get; set; }
public ImageSource Image { get; set; }
}
and
[Serializable]
public class FolderModel : _ModelBase
{
public List<FolderModel> Folders { get; set; }
public List<FileModel> Files { get; set; }
public bool IsExpanded { get; set; }
public FolderModel()
{
Folders = new List<FolderModel>();
Files = new List<FileModel>();
}
}
and
[Serializable]
public class FileModel : _ModelBase
{
public string FileName { get; set; }
}
I'm trying to serialize a a collection of FolderModels and FileModels:
private void saveAppDataToFile()
{
using (TextWriter textWriter = new StreamWriter(xmlDataFile))
{
XmlSerializer serializer = new XmlSerializer(typeof(FolderModel));
serializer.Serialize(textWriter, Folders);
textWriter.Close();
}
}
I'm gettng the runtime error
"There was an error generating the XML document."
"Unable to cast object of type 'System.Collections.Generic.List`1[MyApp.Models.FolderModel]' to type 'MyApp.Models.FolderModel'"}
I can't figure out why this won't work. Anyone see what's wrong?
Thanks
Everything makes sense in someone's mind
|
|
|
|